public interface PasswordHasher
| Modifier and Type | Interface and Description |
|---|---|
static class |
PasswordHasher.Default
Default implementation
|
static class |
PasswordHasher.HashData
+
Model containing all the parts required for the "BKDF Password Hash Message Format"
|
| Modifier and Type | Method and Description |
|---|---|
String |
hash(char[] password,
int costFactor)
For given password and cost-factor create password hash.
|
PasswordHasher.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)PasswordHasher.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)PasswordHasher.HashData modelCopyright © 2018. All rights reserved.