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[]>
public class BinaryAnonymizer extends AbstractAnonymizer<byte[]>
A default anonymizer for attributes that are not HR- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description BinaryAnonymizer()
Creates a new instance of BinaryAnonymizer.BinaryAnonymizer(Map<Integer,byte[]> latestBytesMap)
Creates a new instance of BinaryAnonymizer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attribute
anonymize(Map<Value,Value> valueMap, Set<Value> valueSet, Attribute attribute)
Anonymize an attribute using pure random values (either chars of bytes, depending on the Attribute type)Map<Integer,byte[]>
getLatestBytesMap()
void
setLatestBytesMap(Map<Integer,byte[]> latestBytesMap)
-
Methods inherited from class org.apache.directory.api.ldap.model.ldif.anonymizer.AbstractAnonymizer
getLatestStringMap, setAnonymizers, setLatestStringMap, setSchemaManager
-
-
-
-
Constructor Detail
-
BinaryAnonymizer
public BinaryAnonymizer()
Creates a new instance of BinaryAnonymizer.
-
BinaryAnonymizer
public BinaryAnonymizer(Map<Integer,byte[]> latestBytesMap)
Creates a new instance of BinaryAnonymizer.- Parameters:
latestBytesMap
- The map containing the latest value for each length
-
-
Method Detail
-
anonymize
public Attribute anonymize(Map<Value,Value> valueMap, Set<Value> valueSet, Attribute attribute)
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
public Map<Integer,byte[]> getLatestBytesMap()
- Specified by:
getLatestBytesMap
in interfaceAnonymizer<byte[]>
- Overrides:
getLatestBytesMap
in classAbstractAnonymizer<byte[]>
- Returns:
- The latest byte[] anonymized value map
-
setLatestBytesMap
public void setLatestBytesMap(Map<Integer,byte[]> latestBytesMap)
- Specified by:
setLatestBytesMap
in interfaceAnonymizer<byte[]>
- Overrides:
setLatestBytesMap
in classAbstractAnonymizer<byte[]>
- Parameters:
latestBytesMap
- The latest byte[] anonymized value map
-
-