public static final class PasswordHasher.Default extends Object implements PasswordHasher
PasswordHasher.Default| 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.
|
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 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)HashData modelpublic Version getHashVersion()
PasswordHasherVersion.getHashVersion in interface PasswordHasherCopyright © 2018. All rights reserved.