Class NoOpTextEncryptor
- java.lang.Object
-
- org.craftercms.commons.crypto.impl.NoOpTextEncryptor
-
- All Implemented Interfaces:
TextEncryptor
,org.springframework.beans.factory.InitializingBean
public class NoOpTextEncryptor extends Object implements TextEncryptor, org.springframework.beans.factory.InitializingBean
TextEncryptor
that does not actually encrypt or decrypt the text at all. Useful for development environments, but should completely be disregarded in production environments. That's why and warning is issued during post construct- Author:
- avasquez
-
-
Field Summary
Fields Modifier and Type Field Description static String
LOG_KEY_NOOP_USED
-
Constructor Summary
Constructors Constructor Description NoOpTextEncryptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
String
decrypt(String encrypted)
Decrypts the specified encrypted text.String
encrypt(String clear)
Encrypts the specified clear text.
-
-
-
Field Detail
-
LOG_KEY_NOOP_USED
public static final String LOG_KEY_NOOP_USED
- See Also:
- Constant Field Values
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
encrypt
public String encrypt(String clear) throws CryptoException
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
public String decrypt(String encrypted) throws CryptoException
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
-
-