|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Objectorg.jasypt.util.password.BasicPasswordEncryptor
public final class BasicPasswordEncryptor
Utility class for easily performing password digesting and checking.
This class internally holds a StandardStringDigester
configured this way:
The required steps to use it are:
encryptPassword(String) or
checkPassword(String, String)
operations.This class is thread-safe
| Constructor Summary | |
|---|---|
BasicPasswordEncryptor()
Creates a new instance of BasicPasswordEncryptor |
|
| Method Summary | |
|---|---|
boolean |
checkPassword(String plainPassword,
String encryptedPassword)
Checks an unencrypted (plain) password against an encrypted one (a digest) to see if they match. |
String |
encryptPassword(String password)
Encrypts (digests) a password. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicPasswordEncryptor()
| Method Detail |
|---|
public String encryptPassword(String password)
encryptPassword in interface PasswordEncryptorpassword - the password to be encrypted.
StandardStringDigester.digest(String)
public boolean checkPassword(String plainPassword,
String encryptedPassword)
checkPassword in interface PasswordEncryptorplainPassword - the plain password to check.encryptedPassword - the digest against which to check the password.
StandardStringDigester.matches(String, String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||