Class BinaryAnonymizer
java.lang.Object
org.apache.directory.api.ldap.model.ldif.anonymizer.AbstractAnonymizer<byte[]>
org.apache.directory.api.ldap.model.ldif.anonymizer.BinaryAnonymizer
- All Implemented Interfaces:
Anonymizer<byte[]>
A default anonymizer for attributes that are not HR
- Author:
- Apache Directory Project
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe latest anonymized byte[] value mapFields inherited from class AbstractAnonymizer
attributeAnonymizers, caseSensitive, schemaManager -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of BinaryAnonymizer.BinaryAnonymizer(Map<Integer, byte[]> latestBytesMap) Creates a new instance of BinaryAnonymizer. -
Method Summary
Modifier and TypeMethodDescriptionAnonymize an attribute using pure random values (either chars of bytes, depending on the Attribute type)Get the map of anonymized byte[] valuesvoidsetLatestBytesMap(Map<Integer, byte[]> latestBytesMap) Set a new map of anynomized binary valuesMethods inherited from class AbstractAnonymizer
computeNewValue, computeNewValue, getLatestStringMap, setAnonymizers, setLatestStringMap, setSchemaManager
-
Field Details
-
latestBytesMap
-
-
Constructor Details
-
BinaryAnonymizer
public BinaryAnonymizer()Creates a new instance of BinaryAnonymizer. -
BinaryAnonymizer
-
-
Method Details
-
anonymize
Anonymize an attribute using pure random values (either chars of bytes, depending on the Attribute type)- Parameters:
valueMap- The existing map of value to the associated anonymized counterpartvalueSet- The existing set of anonymized counterpartattribute- The attribute to anonymize- Returns:
- The anonymized attribute
-
getLatestBytesMap
Get the map of anonymized byte[] values- Specified by:
getLatestBytesMapin interfaceAnonymizer<byte[]>- Overrides:
getLatestBytesMapin classAbstractAnonymizer<byte[]>- Returns:
- The latest byte[] anonymized value map
-
setLatestBytesMap
Set a new map of anynomized binary values- Specified by:
setLatestBytesMapin interfaceAnonymizer<byte[]>- Overrides:
setLatestBytesMapin classAbstractAnonymizer<byte[]>- Parameters:
latestBytesMap- The latest byte[] anonymized value map
-