public class Pbkdf2WithHmacSha512Strategy extends Pbkdf2Strategy
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_HASH_LENGTH |
DEFAULT_ITERATIONS, DEFAULT_SALT_LENGTH
Constructor and Description |
---|
Pbkdf2WithHmacSha512Strategy()
Construct a default PBKDF2WithHmacSHA512 instance
|
Modifier and Type | Method and Description |
---|---|
static Pbkdf2WithHmacSha512Strategy |
getInstance(int saltLength,
int dkLength,
int iterations)
Acquire a custom PBKDF2WithHmacSHA512 instance
|
hash, needsRehash, verify
public static final int DEFAULT_HASH_LENGTH
public Pbkdf2WithHmacSha512Strategy()
public static Pbkdf2WithHmacSha512Strategy getInstance(int saltLength, int dkLength, int iterations) throws InvalidHashException
saltLength
- length of the salt to be generated (in bytes)dkLength
- length of the hash output (in bytes)iterations
- amount of iterationsInvalidHashException
- if dkLength is > 64. This is because for password hashing, PBKDF dklength should
never exceed the output length of the underlying hash function.Copyright © 2020. All rights reserved.