| Constructor and Description |
|---|
HashStrategy(HashStrategy delegate) |
| Modifier and Type | Method and Description |
|---|---|
String |
computeHash(String password,
User user)
Compute the hashed password given the unhashed password and the user
|
Object |
getDelegate() |
String |
getSalt(User user)
Retrieve the salt.
|
HashSaltStyle |
getSaltStyle()
Get the defined
HashSaltStyle of the current instance |
String |
getStoredPwd(User user)
Retrieve the password from the user, or as clear text or as hashed version, depending on the definition
|
static HashStrategy |
newInstance(HashStrategy arg) |
void |
setExternalSalt(String salt)
Set an external salt.
|
void |
setSaltStyle(HashSaltStyle saltStyle)
Set the saltstyle as defined by
HashSaltStyle. |
public HashStrategy(HashStrategy delegate)
public Object getDelegate()
public String computeHash(String password, User user)
password - the unhashed passworduser - the user to get the salt for. This paramter is needed, if the is declared to be usedpublic String getStoredPwd(User user)
user - the user to get the stored password forpublic String getSalt(User user)
HashSaltStyleuser - the user to get the salt for. This paramter is needed, if the is declared to be usedpublic void setExternalSalt(String salt)
salt - the salt, which shall be usedpublic void setSaltStyle(HashSaltStyle saltStyle)
HashSaltStyle.saltStyle - the HashSaltStyle to be usedpublic HashSaltStyle getSaltStyle()
HashSaltStyle of the current instancepublic static HashStrategy newInstance(HashStrategy arg)
Copyright © 2015. All rights reserved.