public class KeyDerivationBcryptSecureHasher extends BcryptSecureHasher
| Modifier and Type | Field and Description |
|---|---|
private int |
derivedKeyLength |
private static String |
DIGEST_ALGORITHM |
private boolean |
digestBcryptHash |
private static int |
HASH_START_INDEX |
private static org.slf4j.Logger |
LOGGER |
saltLength, UPPER_BOUNDARY| Constructor and Description |
|---|
KeyDerivationBcryptSecureHasher(int derivedKeyLength)
Key Deriviation Bcrypt Secure Hasher with specified Derived Key Length
|
KeyDerivationBcryptSecureHasher(int derivedKeyLength,
int cost,
boolean digestBcryptHash)
Key Deriviation Bcrypt Secure Hasher with specified Derived Key Length and Cost Parameters
|
| Modifier and Type | Method and Description |
|---|---|
private MessageDigest |
getMessageDigest() |
(package private) byte[] |
hash(byte[] input,
byte[] rawSalt)
Hash raw bytes using provided salt and then leverage SHA-512 to digest the results and truncate to length requested
|
acceptsEmptyInput, convertBcryptRadix64ToMimeBase64, convertMimeBase64ToBcryptRadix64, getAlgorithmName, getDefaultSaltLength, getMaxSaltLength, getMinSaltLength, hash, isCostValidgetSalt, hashBase64, hashBase64, hashHex, hashHex, hashRaw, hashRaw, initializeSalt, isSaltLengthValid, isUsingStaticSaltprivate static final org.slf4j.Logger LOGGER
private static final String DIGEST_ALGORITHM
private static final int HASH_START_INDEX
private final int derivedKeyLength
private final boolean digestBcryptHash
public KeyDerivationBcryptSecureHasher(int derivedKeyLength)
derivedKeyLength - Derived Key Length in bytespublic KeyDerivationBcryptSecureHasher(int derivedKeyLength,
int cost,
boolean digestBcryptHash)
derivedKeyLength - Derived Key Length in bytescost - Cost Parameter for calculationdigestBcryptHash - Enable to disable digesting of bcrypt hash to support legacy derivation functionsbyte[] hash(byte[] input,
byte[] rawSalt)
hash in class BcryptSecureHasherinput - Raw bytes to be hashedrawSalt - Raw salt bytes to be hashedprivate MessageDigest getMessageDigest()
Copyright © 2022 Apache NiFi Project. All rights reserved.