public class PasswordHasherImpl extends java.lang.Object implements PasswordHasher
Constructor and Description |
---|
PasswordHasherImpl(<any> passphrase) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
calculateRFC2104HMAC(java.lang.String data,
java.lang.String key) |
java.lang.String |
generateSalt() |
java.lang.String |
getHmacPassphrase() |
java.lang.String |
hashPassword(java.lang.String password)
Returns a hashed password
|
java.lang.String |
hashPassword(java.lang.String password,
java.lang.String salt) |
boolean |
validatePassword(java.lang.String hashedPassword,
java.lang.String cleartextPassword) |
public java.lang.String hashPassword(java.lang.String password)
PasswordHasher
hashPassword
in interface PasswordHasher
public java.lang.String hashPassword(java.lang.String password, java.lang.String salt)
hashPassword
in interface PasswordHasher
public java.lang.String generateSalt()
public boolean validatePassword(java.lang.String hashedPassword, java.lang.String cleartextPassword)
validatePassword
in interface PasswordHasher
public java.lang.String calculateRFC2104HMAC(java.lang.String data, java.lang.String key) throws java.security.SignatureException
java.security.SignatureException
public java.lang.String getHmacPassphrase()
getHmacPassphrase
in interface PasswordHasher