public final class JasyptCrypt extends Object
Jasypt's implementation of ICrypt, based on the use of a
PBEByteEncryptor object for encryption and decryption operations.
This class is thread-safe.
| Constructor and Description |
|---|
JasyptCrypt(PBEByteEncryptor encryptor)
Creates a new JasyptCrypt object, wrapping the passed
encryptor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
decryptUrlSafe(String text)
Decrypts a string using URL and filename safe Base64 decoding.
|
String |
encryptUrlSafe(String plainText)
Encrypts a string using URL and filename safe Base64 encoding.
|
void |
setKey(String key)
Important: Using jasypt, it makes no sense to change the encryption
key once the encryptor has been initialized, and so this method is
implemented to throw UnsupportedOperationException always.
|
public JasyptCrypt(PBEByteEncryptor encryptor)
Creates a new JasyptCrypt object, wrapping the passed encryptor.
encryptor - the PBEByteEncryptor to be used internally.public String decryptUrlSafe(String text)
Decrypts a string using URL and filename safe Base64 decoding.
text - the text to be decrypted.public String encryptUrlSafe(String plainText)
Encrypts a string using URL and filename safe Base64 encoding.
plainText - the text to be encrypted.public void setKey(String key)
Important: Using jasypt, it makes no sense to change the encryption key once the encryptor has been initialized, and so this method is implemented to throw UnsupportedOperationException always.
Copyright © 2015 The JASYPT team. All rights reserved.