public interface PasswordEncoder
extends java.io.Serializable
| Modifier and Type | Method and Description |
|---|---|
boolean |
check(java.lang.String uid,
java.lang.String encoded,
java.lang.String plain)
Checks if the
encoded password (from the user, from the database) and the plain password
(from the login screen) matches. |
java.lang.String |
decode(java.lang.String encoded)
Decode the given
encoded password. |
java.lang.String |
encode(java.lang.String uid,
java.lang.String plain)
Returns the encoded password string based on the implementation of this interface and by the given
plain password. |
java.lang.String encode(java.lang.String uid,
java.lang.String plain)
plain password. The uid can be used as additional salt (see SaltedMD5PasswordEncoder).uid - mostly userID, mostly not usedplain - the plain passwordSaltedMD5PasswordEncoder,
PlainTextPasswordEncoderboolean check(java.lang.String uid,
java.lang.String encoded,
java.lang.String plain)
encoded password (from the user, from the database) and the plain password
(from the login screen) matches.uid - mostly the user ID and mostly not used. For MD5 used as salt.encoded - the encoded passwordplain - the plain text passwordtrue if they match, false otherwise.MD5PasswordEncoderjava.lang.String decode(java.lang.String encoded)
throws EJBCannotDecodePasswordException
encoded password. Throws exception if this is not possible.encoded - the encoded passwordEJBCannotDecodePasswordException - if the password cannot be decoded. (MD5 passwords cannot be decoded)MD5PasswordEncoderCopyright © 2018 SAP SE. All Rights Reserved.