com.ibm.commerce.foundation.common.util.encryption

Interface EncryptionProvider

  • All Superinterfaces:
    com.ibm.commerce.foundation.internal.common.util.encryption.EncryptionProvider


    public interface EncryptionProvider
    extends com.ibm.commerce.foundation.internal.common.util.encryption.EncryptionProvider
    This Encryption Provider interface defines the methods the encryption implementation must provide.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM Copyright notice field.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      java.lang.String decrypt(java.lang.String text)
      This method returns a string that represents the decrypted value of the text specified.
      java.lang.String decrypt(java.lang.String text, java.lang.String encoding)
      This method returns a string that represents the decrypted value of the text specified.
      java.lang.String encrypt(java.lang.String text)
      This method returns a string that represents the encrypted value of the text specified.
      java.lang.String encrypt(java.lang.String text, java.lang.String encoding)
      This method returns a string that represents the encrypted value of the text specified.
      java.lang.String encrypt(java.lang.String text, java.lang.String encoding, java.lang.String keyVersion)
      This method returns a string that represents the encrypted value of the text specified, using the specified version of the encryption key.
      java.lang.String getVersionForEncryptedText(java.lang.String encryptedValue)
      Gets the version ID associated with a particular encrypted text.
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
    • Method Detail

      • decrypt

        java.lang.String decrypt(java.lang.String text)
        This method returns a string that represents the decrypted value of the text specified.
        Specified by:
        decrypt in interface com.ibm.commerce.foundation.internal.common.util.encryption.EncryptionProvider
        Parameters:
        text - The text to be decrypted
        Returns:
        The decrypted value of the text
      • decrypt

        java.lang.String decrypt(java.lang.String text,
                                 java.lang.String encoding)
        This method returns a string that represents the decrypted value of the text specified. The user can optionally specify the encoding of the value returned
        Specified by:
        decrypt in interface com.ibm.commerce.foundation.internal.common.util.encryption.EncryptionProvider
        Parameters:
        text - The text to be decrypted
        encoding - The encoding that the plain text is in. If it is null, the default is UTF-8.
        Returns:
        The decrypted value of the text
      • encrypt

        java.lang.String encrypt(java.lang.String text)
        This method returns a string that represents the encrypted value of the text specified.
        Specified by:
        encrypt in interface com.ibm.commerce.foundation.internal.common.util.encryption.EncryptionProvider
        Parameters:
        text - The text to be encrypted
        Returns:
        The encrypted value of the text
      • encrypt

        java.lang.String encrypt(java.lang.String text,
                                 java.lang.String encoding)
        This method returns a string that represents the encrypted value of the text specified. The user can optionally specify the encoding of the value returned
        Specified by:
        encrypt in interface com.ibm.commerce.foundation.internal.common.util.encryption.EncryptionProvider
        Parameters:
        text - The text to be encrypted
        encoding - The encoding that the plain text is in. If it is null, the default is UTF-8.
        Returns:
        The encrypted value of the text
      • encrypt

        java.lang.String encrypt(java.lang.String text,
                                 java.lang.String encoding,
                                 java.lang.String keyVersion)
        This method returns a string that represents the encrypted value of the text specified, using the specified version of the encryption key. The user can optionally specify the encoding of the value returned
        Specified by:
        encrypt in interface com.ibm.commerce.foundation.internal.common.util.encryption.EncryptionProvider
        Parameters:
        text - The text to be encrypted
        encoding - The encoding that the plain text is in. If it is null, the default is UTF-8.
        keyVersion - The version of the encryption key to use for encryption.
        Returns:
        The encrypted value of the text
      • getVersionForEncryptedText

        java.lang.String getVersionForEncryptedText(java.lang.String encryptedValue)
        Gets the version ID associated with a particular encrypted text. This version ID corresponds to the version of the key that is used to encrypt the data.
        Specified by:
        getVersionForEncryptedText in interface com.ibm.commerce.foundation.internal.common.util.encryption.EncryptionProvider
        Parameters:
        encryptedValue - The encrypted value.
        Returns:
        The version of the key that is used to encrypt the value. Null is returned if no version is found.