public static final class PasswordHasher.Default extends Object implements PasswordHasher
PasswordHasher.Default, PasswordHasher.HashData| 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.
|
public String hash(char[] password, int costFactor)
PasswordHasher
The internal salt will be created automatically with a secure CPRNG. Usually implementations
support passing your own implementation of a CPRNG (i.e. SecureRandom).
hash in interface PasswordHasherpassword - from usercostFactor - exponential cost (log2 factor) between 4 and 31 e.g. 12 -->
2^12 = 4,096 iterations (higher == slower == more secure)public PasswordHasher.HashData hashRaw(char[] password, int costFactor)
PasswordHasherhashRaw in interface PasswordHasherpassword - 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.