public class CompositePasswordEncoder extends Object
Modifier and Type | Field and Description |
---|---|
static List<String> |
MD4 |
static String |
MD4_KEY |
static List<String> |
SHA256 |
Constructor and Description |
---|
CompositePasswordEncoder() |
Modifier and Type | Method and Description |
---|---|
protected String |
encode(String encoderKey,
String rawPassword,
Object salt)
Encode a password using the specified encoderKey
|
String |
encodePassword(String rawPassword,
Object salt,
List<String> encodingChain)
Encode a password
|
String |
encodePreferred(String rawPassword,
Object salt)
Encodes a password in the preferred encoding.
|
String |
getPreferredEncoding() |
void |
init()
Basic init method for checking mandatory properties
|
boolean |
isSafeToEncodeChain(List<String> encodingChain)
Determines if its safe to encode the encoding chain.
|
boolean |
lastEncodingIsPreferred(List<String> hashIndicator)
Is the preferred encoding the last encoding to be used.
|
protected boolean |
matches(String encoderKey,
String rawPassword,
String encodedPassword,
Object salt)
Does the password match?
|
boolean |
matchesPassword(String rawPassword,
String encodedPassword,
Object salt,
List<String> encodingChain)
Does the password match?
|
void |
setEncoders(Map<String,Object> encoders) |
void |
setPreferredEncoding(String preferredEncoding) |
public static final String MD4_KEY
public String getPreferredEncoding()
public void setPreferredEncoding(String preferredEncoding)
public boolean lastEncodingIsPreferred(List<String> hashIndicator)
hashIndicator
- representing the encodingpublic boolean isSafeToEncodeChain(List<String> encodingChain)
encodingChain
- mandatory encoding chainpublic void init()
public String encodePassword(String rawPassword, Object salt, List<String> encodingChain)
rawPassword
- mandatory passwordsalt
- optional saltencodingChain
- mandatory encoding chainpublic String encodePreferred(String rawPassword, Object salt)
rawPassword
- mandatory passwordsalt
- optional saltprotected String encode(String encoderKey, String rawPassword, Object salt)
encoderKey
- the encoder to userawPassword
- mandatory passwordsalt
- optional saltpublic boolean matchesPassword(String rawPassword, String encodedPassword, Object salt, List<String> encodingChain)
rawPassword
- mandatory passwordencodedPassword
- mandatory hashed versionsalt
- optional saltencodingChain
- mandatory encoding chainprotected boolean matches(String encoderKey, String rawPassword, String encodedPassword, Object salt)
encoderKey
- the encoder to userawPassword
- mandatory passwordencodedPassword
- mandatory hashed versionsalt
- optional saltCopyright © 2005–2017 Alfresco Software. All rights reserved.