Class StringEncrypter

    • Method Detail

      • getEncrypter

        public static StringEncrypter getEncrypter()
        Gets the Encrypter for String
        Returns:
        the encrypter
      • encrypt

        public String encrypt​(String string)
                       throws Exception
        Encrypts the string with the context Key
        Specified by:
        encrypt in interface Encrypter<String>
        Parameters:
        string - the string to encrypt
        Returns:
        the encrypted string in a Base64 encoding
        Throws:
        Exception
      • encrypt

        public String encrypt​(String string,
                              Key ekey)
                       throws Exception
        Encrypts the string with the given key
        Specified by:
        encrypt in interface Encrypter<String>
        Parameters:
        string - the string to encrypt
        key - the key for encrypting
        Returns:
        the encrypted string in a Base64 encoding
        Throws:
        Exception