Package org.craftercms.commons.crypto
Interface TextEncryptor
-
- All Known Implementing Classes:
AesTextEncryptor
,NoOpTextEncryptor
,PbkAesTextEncryptor
public interface TextEncryptor
Thread-safe service that facilitates easy encryption and decryption of text.- Author:
- avasquez
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
decrypt(String encrypted)
Decrypts the specified encrypted text.String
encrypt(String clear)
Encrypts the specified clear text.
-
-
-
Method Detail
-
encrypt
String encrypt(String clear) throws CryptoException
Encrypts the specified clear text.- Parameters:
clear
- the clear text to encrypt- Returns:
- the encrypted text
- Throws:
CryptoException
-
decrypt
String decrypt(String encrypted) throws CryptoException
Decrypts the specified encrypted text.- Parameters:
encrypted
- the encrypted text to decrypt- Returns:
- the clear text
- Throws:
CryptoException
-
-