public interface PasswordHasher
| Modifier and Type | Interface and Description |
|---|---|
static class |
PasswordHasher.Default
Default implementation
|
| Modifier and Type | Method and Description |
|---|---|
Version |
getHashVersion()
Get the in this instance used hash version.
|
String |
hash(char[] password,
int costFactor)
For given password and cost-factor create password hash.
|
HashData |
hashRaw(char[] password,
int costFactor)
For given password and cost-factor create password hash.
|
String hash(char[] password, int costFactor)
The internal salt will be created automatically with a secure CPRNG. Usually implementations
support passing your own implementation of a CPRNG (i.e. SecureRandom).
password - from usercostFactor - exponential cost (log2 factor) between 4 and 31 e.g. 12 -->
2^12 = 4,096 iterations (higher == slower == more secure)HashData hashRaw(char[] password, int costFactor)
password - from usercostFactor - exponential cost (log2 factor) between 4 and 31 e.g. 12 -->
2^12 = 4,096 iterations (higher == slower == more secure)HashData modelCopyright © 2018. All rights reserved.