public interface PasswordHasher
extends java.io.Serializable
It has two uses:
encryptPassword()
and store the returned value:
The hashed password and hash key pair are both required to properly check the password, a process which is done as follows:
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
Modifier and Type | Method and Description |
---|---|
boolean |
checkPassword(java.lang.String pLoginPassword,
java.lang.String pEncryptedPassword,
java.lang.Object pHashKey)
Returns true if the login password matches the encrypted password.
|
java.lang.String |
encryptPassword(java.lang.String pPassword)
Encrypts a password suitably for long-term storage.
|
PasswordHasher |
getLoginPasswordHasher()
Returns a password hasher instance useful for performing a login.
|
java.lang.Object |
getPasswordHashKey()
Returns the hash key (if any) that was used for hashing the password
for login.
|
java.lang.String |
getPwdHasherComponentPath()
Returns a password hasher component path which is useful when checking if
two password hashers are same or not
|
java.lang.String |
hashPasswordForLogin(java.lang.String pPassword)
Performs the appropriate hashing function for a login process.
|
static final java.lang.String CLASS_VERSION
java.lang.String encryptPassword(java.lang.String pPassword)
boolean checkPassword(java.lang.String pLoginPassword, java.lang.String pEncryptedPassword, java.lang.Object pHashKey)
java.lang.String hashPasswordForLogin(java.lang.String pPassword)
java.lang.Object getPasswordHashKey()
PasswordHasher getLoginPasswordHasher()
java.lang.String getPwdHasherComponentPath()