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 Details

  • Constructor Details

    • NoOpTextEncryptor

      public NoOpTextEncryptor()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.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 interface TextEncryptor
      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 interface TextEncryptor
      Parameters:
      encrypted - the encrypted text to decrypt
      Returns:
      the clear text
      Throws:
      CryptoException