public class JasyptPasswordDigester extends Object implements PasswordDigester
StringDigester.| Constructor and Description |
|---|
JasyptPasswordDigester(String id,
org.jasypt.digest.StringDigester jasyptDigester)
Initializes an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
String |
digest(String password)
Create a digest of the provided password.
|
String |
getId()
Returns unique identifier of this digester to be able to distinguish between various hashing algorithms.
|
boolean |
isDefault()
Should this digester become the default password digester, which is used in the system?
|
boolean |
matches(String password,
String digest)
Checks, if the provided clear text password matches the specified digest, considering all aspects like salt, hashing iterations, etc.
|
void |
setDefault(boolean isDefault)
Enforces this digester to override the default platform's one.
|
void |
setId(String id)
Sets the unique identifier of this digester.
|
void |
setJasyptDigester(org.jasypt.digest.StringDigester jasyptDigester) |
public JasyptPasswordDigester(String id, org.jasypt.digest.StringDigester jasyptDigester)
id - the password digester IDjasyptDigester - the StringDigester instance to be used for password hashing and checkspublic String digest(String password)
PasswordDigesterdigest in interface PasswordDigesterpassword - the clear text password to be hashedpublic String getId()
PasswordDigestergetId in interface PasswordDigesterpublic boolean isDefault()
PasswordDigesterisDefault in interface PasswordDigestertrue if this digester becomes the default one, which is used in the systempublic boolean matches(String password, String digest)
PasswordDigestermatches in interface PasswordDigesterpassword - the clear text password to be checkeddigest - the digest against which the password will be matchedtrue, if the provided password matches its hashed equivalentpublic void setDefault(boolean isDefault)
isDefault - should this digester become the default one?public void setId(String id)
id - the unique identifier of this digesterpublic void setJasyptDigester(org.jasypt.digest.StringDigester jasyptDigester)
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.