Class AbstractJceCrypt

    • Method Detail

      • encryptUrlSafe

        public final String encryptUrlSafe​(String plainText)
        Encrypt a string into a string using URL safe Base64 encoding.
        Specified by:
        encryptUrlSafe in interface ICrypt
        Parameters:
        plainText - text to encrypt
        Returns:
        encrypted string
      • decrypt

        protected abstract byte[] decrypt​(byte[] encrypted)
        Decrypts an encrypted byte array.
        Parameters:
        encrypted - byte array to decrypt
        Returns:
        the decrypted text
      • encrypt

        protected abstract byte[] encrypt​(byte[] plainBytes)
        Encrypts the given text into a byte array.
        Parameters:
        plainBytes - text to encrypt
        Returns:
        the string encrypted
      • setKey

        public final void setKey​(String key)
        Description copied from interface: ICrypt
        Sets private encryption key. It depends on the implementation if a default key is applied or an exception is thrown, if no private key has been provided.
        Specified by:
        setKey in interface ICrypt
        Parameters:
        key - private key