|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.jasypt.util.text.StrongTextEncryptor
public final class StrongTextEncryptor
Utility class for easily performing high-strength encryption of texts.
This class internally holds a StandardPBEStringEncryptor
configured this way:
The required steps to use it are:
setPassword(String)
or
setPasswordCharArray(char[])
).encrypt(String)
or
decrypt(String)
operations.To use this class, you may need to download and install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files.
This class is thread-safe.
Constructor Summary | |
---|---|
StrongTextEncryptor()
Creates a new instance of StrongTextEncryptor. |
Method Summary | |
---|---|
String |
decrypt(String encryptedMessage)
Decrypts a message. |
String |
encrypt(String message)
Encrypts a message. |
void |
setPassword(String password)
Sets a password. |
void |
setPasswordCharArray(char[] password)
Sets a password, as a char[]. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StrongTextEncryptor()
Method Detail |
---|
public void setPassword(String password)
password
- the password to be set.public void setPasswordCharArray(char[] password)
password
- the password to be set.public String encrypt(String message)
encrypt
in interface TextEncryptor
message
- the message to be encrypted.StandardPBEStringEncryptor.encrypt(String)
public String decrypt(String encryptedMessage)
decrypt
in interface TextEncryptor
encryptedMessage
- the message to be decrypted.StandardPBEStringEncryptor.decrypt(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |