public final class MessageDigestHasher extends Hasher
Modifier and Type | Class and Description |
---|---|
static class |
MessageDigestHasher.MessageDigestHasherProvenance
Provenance for
MessageDigestHasher . |
Modifier and Type | Field and Description |
---|---|
static Charset |
utf8Charset |
MIN_LENGTH
Constructor and Description |
---|
MessageDigestHasher(String hashType,
String salt) |
Modifier and Type | Method and Description |
---|---|
static Supplier<MessageDigest> |
getDigestSupplier(String hashType)
Creates a supplier for the specified hash type.
|
com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance |
getProvenance() |
String |
hash(String input)
Hashes the supplied input using the hashing function.
|
void |
postConfig()
Used by the OLCUT configuration system, and should not be called by external code.
|
void |
setSalt(String salt)
The salt is transient, it must be set **to the same value as it was trained with**
after the
Model is deserialized. |
String |
toString() |
validateSalt
public static final Charset utf8Charset
public void postConfig() throws com.oracle.labs.mlrg.olcut.config.PropertyException
com.oracle.labs.mlrg.olcut.config.PropertyException
public String hash(String input)
Hasher
public void setSalt(String salt)
Hasher
Model
is deserialized.public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()
public static Supplier<MessageDigest> getDigestSupplier(String hashType)
hashType
- The hash type, used to specify the MessageDigest implementation.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.