Interface Encryptor

    • Method Detail

      • encrypt

        String encrypt​(String value)
        Encrypt a clear text String.
        Parameters:
        value - The clear text attribute
        Returns:
        The encrypted attribute, or null
      • encrypt

        String encrypt​(String value,
                       byte[] iv)
        Encrypt a clear text String.
        Parameters:
        value - The clear text attribute
        iv - The IV to use, or null for the default IV
        Returns:
        The encrypted attribute, or null
      • decrypt

        String decrypt​(String value)
        Decrypt an encrypted String.
        Parameters:
        value - The encrypted attribute in Base64 encoding
        Returns:
        The clear text attribute, or null
      • decrypt

        String decrypt​(String value,
                       byte[] iv)
        Decrypt an encrypted String.
        Parameters:
        value - The encrypted attribute in Base64 encoding
        iv - The IV to use, or null for the default IV
        Returns:
        The clear text attribute, or null
      • setKey

        void setKey​(String key)
        Set the encryption key. This will apply the user-defined key, truncated or filled (via the default key) as needed to meet the key length specifications.
        Parameters:
        key - The encryption key