public class SaltEncodingPolicy extends Object
GenericSaltedPasswordEncoder that defines
a strategy in which salt is calculated. It is backward-compatible with salting logic provided by now deprecated
SaltedMD5PasswordEncoder| Constructor and Description |
|---|
SaltEncodingPolicy() |
| Modifier and Type | Method and Description |
|---|---|
String |
generateUserSalt(String uid)
Generates salt based on user id
|
String |
getSystemSpecificSalt()
Returns system specific salt
|
boolean |
isSaltedAlready(String password)
Checks if the submitted string starts with the return value of
isSaltedAlready(String). |
String |
saltify(String uid,
String password)
Return password with added salt
|
void |
setSalt(String salt) |
public String generateUserSalt(String uid)
uid - user idpublic String saltify(String uid, String password)
uid - user idpassword - password to be saltedpublic boolean isSaltedAlready(String password)
isSaltedAlready(String).password - the submitted passwordisSaltedAlready(String).public String getSystemSpecificSalt()
public void setSalt(String salt)
Copyright © 2017 SAP SE. All Rights Reserved.