Class PbkAesTextEncryptor
java.lang.Object
org.craftercms.commons.crypto.impl.PbkAesTextEncryptor
- All Implemented Interfaces:
TextEncryptor
Wrapper for
AesTextEncryptor
that generates the encryption key based
on a password and salt.- Author:
- avasquez
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PbkAesTextEncryptor
@ConstructorProperties({"password","salt"}) public PbkAesTextEncryptor(String password, String salt) throws CryptoException - Throws:
CryptoException
-
-
Method Details
-
encrypt
Description copied from interface:TextEncryptor
Encrypts the specified clear text.- Specified by:
encrypt
in interfaceTextEncryptor
- Parameters:
clear
- the clear text to encrypt- Returns:
- the encrypted text
- Throws:
CryptoException
-
decrypt
Description copied from interface:TextEncryptor
Decrypts the specified encrypted text.- Specified by:
decrypt
in interfaceTextEncryptor
- Parameters:
encrypted
- the encrypted text to decrypt- Returns:
- the clear text
- Throws:
CryptoException
-