| java.lang.Object org.acegisecurity.providers.ldap.authenticator.LdapShaPasswordEncoder
LdapShaPasswordEncoder | public class LdapShaPasswordEncoder implements PasswordEncoder(Code) | | A version of
ShaPasswordEncoder which supports Ldap SHA and SSHA (salted-SHA) encodings. The values are
base-64 encoded and have the label "{SHA}" (or "{SSHA}") prepended to the encoded hash. These can be made lower-case
in the encoded password, if required, by setting the forceLowerCasePrefix property to true.
author: Luke Taylor version: $Id: LdapShaPasswordEncoder.java 1958 2007-08-27 16:23:14Z luke_t $ |
Method Summary | |
public String | encodePassword(String rawPass, Object salt) Calculates the hash of password (and salt bytes, if supplied) and returns a base64 encoded concatenation
of the hash and salt, prefixed with {SHA} (or {SSHA} if salt was used).
Parameters: rawPass - the password to be encoded. Parameters: salt - the salt. | public boolean | isPasswordValid(String encPass, String rawPass, Object salt) Checks the validity of an unencoded password against an encoded one in the form
"{SSHA}sQuQF8vj8Eg2Y1hPdh3bkQhCKQBgjhQI".
Parameters: encPass - the actual SSHA or SHA encoded password Parameters: rawPass - unencoded password to be verified. Parameters: salt - ignored. | public void | setForceLowerCasePrefix(boolean forceLowerCasePrefix) |
LdapShaPasswordEncoder | public LdapShaPasswordEncoder()(Code) | | |
encodePassword | public String encodePassword(String rawPass, Object salt)(Code) | | Calculates the hash of password (and salt bytes, if supplied) and returns a base64 encoded concatenation
of the hash and salt, prefixed with {SHA} (or {SSHA} if salt was used).
Parameters: rawPass - the password to be encoded. Parameters: salt - the salt. Must be a byte array or null. the encoded password in the specified format |
isPasswordValid | public boolean isPasswordValid(String encPass, String rawPass, Object salt)(Code) | | Checks the validity of an unencoded password against an encoded one in the form
"{SSHA}sQuQF8vj8Eg2Y1hPdh3bkQhCKQBgjhQI".
Parameters: encPass - the actual SSHA or SHA encoded password Parameters: rawPass - unencoded password to be verified. Parameters: salt - ignored. If the format is SSHA the salt bytes will be extracted from the encoded password. true if they match (independent of the case of the prefix). |
setForceLowerCasePrefix | public void setForceLowerCasePrefix(boolean forceLowerCasePrefix)(Code) | | |
|
|