@Immutable protected static final class MaskStrings.HashValueConverter extends Object implements ValueConverter
| Modifier and Type | Field and Description |
|---|---|
private MessageDigest |
hashAlgorithm |
private static org.slf4j.Logger |
LOGGER |
private byte[] |
salt |
| Constructor and Description |
|---|
HashValueConverter(byte[] salt,
String hashAlgorithm) |
| Modifier and Type | Method and Description |
|---|---|
Object |
convert(Object value)
Convert the column's data value.
|
private String |
convertToHexadecimalFormat(byte[] bytes) |
private String |
toHash(Serializable value) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitand, nullOr, or, passthroughprivate static final org.slf4j.Logger LOGGER
private final byte[] salt
private final MessageDigest hashAlgorithm
public HashValueConverter(byte[] salt,
String hashAlgorithm)
public Object convert(Object value)
ValueConverterconvert in interface ValueConvertervalue - the column data valueprivate String toHash(Serializable value) throws IOException
IOExceptionprivate String convertToHexadecimalFormat(byte[] bytes)
Copyright © 2021 JBoss by Red Hat. All rights reserved.