Class SymmetricEncryption


  • public final class SymmetricEncryption
    extends Object
    Encryption utility
    Author:
    Phillip Austerfield (phillip.austerfield@idmedia.com)
    • Constructor Detail

      • SymmetricEncryption

        public SymmetricEncryption​(String secret)
    • Method Detail

      • encrypt

        @Nullable
        public static String encrypt​(String sInput,
                                     String sSecretKey)
        Encrypt Input
        Parameters:
        sInput - Input to be encrypted
        sSecretKey - Secret Key
        Returns:
        Encryption and base64 encoded or null
      • decrypt

        @Nullable
        public static String decrypt​(String sInput,
                                     String sSecretKey)
        Decrypt input
        Parameters:
        sInput - Encrypted input (Base64 encoded as well)
        sSecretKey - Secret Key
        Returns:
        Decrypted Input or null