Package io.debezium.relational.mapping
Class MaskStrings.HashValueConverter
java.lang.Object
io.debezium.relational.mapping.MaskStrings.HashValueConverter
- All Implemented Interfaces:
ValueConverter
- Enclosing class:
- MaskStrings
@Immutable
protected static final class MaskStrings.HashValueConverter
extends Object
implements ValueConverter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MessageDigestprivate final MaskStrings.HashingByteArrayStrategyprivate static final org.slf4j.Loggerprivate final byte[] -
Constructor Summary
ConstructorsConstructorDescriptionHashValueConverter(byte[] salt, String hashAlgorithm, MaskStrings.HashingByteArrayStrategy hashingByteArrayStrategy) -
Method Summary
Modifier and TypeMethodDescriptionConvert the column's data value.private StringconvertToHexadecimalFormat(byte[] bytes) private StringtoHash(Serializable value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.debezium.relational.ValueConverter
and, nullOr, or
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
salt
private final byte[] salt -
hashAlgorithm
-
hashingByteArrayStrategy
-
-
Constructor Details
-
HashValueConverter
public HashValueConverter(byte[] salt, String hashAlgorithm, MaskStrings.HashingByteArrayStrategy hashingByteArrayStrategy)
-
-
Method Details
-
convert
Description copied from interface:ValueConverterConvert the column's data value.- Specified by:
convertin interfaceValueConverter- Parameters:
value- the column data value- Returns:
- the new data value
-
toHash
- Throws:
IOException
-
convertToHexadecimalFormat
-