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
Fields Modifier and Type Field Description private MessageDigest
hashAlgorithm
private static org.slf4j.Logger
LOGGER
private byte[]
salt
-
Constructor Summary
Constructors Constructor Description HashValueConverter(byte[] salt, String hashAlgorithm)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
convert(Object value)
Convert the column's data value.private String
convertToHexadecimalFormat(byte[] bytes)
private String
toHash(Serializable value)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.debezium.relational.ValueConverter
and, nullOr, or
-
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
salt
private final byte[] salt
-
hashAlgorithm
private final MessageDigest hashAlgorithm
-
-
Constructor Detail
-
HashValueConverter
public HashValueConverter(byte[] salt, String hashAlgorithm)
-
-
Method Detail
-
convert
public Object convert(Object value)
Description copied from interface:ValueConverter
Convert the column's data value.- Specified by:
convert
in interfaceValueConverter
- Parameters:
value
- the column data value- Returns:
- the new data value
-
toHash
private String toHash(Serializable value) throws IOException
- Throws:
IOException
-
convertToHexadecimalFormat
private String convertToHexadecimalFormat(byte[] bytes)
-
-