Class DecryptParameters


  • public final class DecryptParameters
    extends Object
    A class containing various configuration parameters that can be applied when performing decryption operations.
    • Method Detail

      • createA128GcmParameters

        public static DecryptParameters createA128GcmParameters​(byte[] ciphertext,
                                                                byte[] iv,
                                                                byte[] authenticationTag)
        Factory method to create an instance of DecryptParameters with the given parameters for EncryptionAlgorithm.A128GCM.
        Parameters:
        ciphertext - The content to be decrypted.
        iv - Initialization vector for the decryption operation.
        authenticationTag - The tag to authenticate when performing decryption.
        Returns:
        The DecryptParameters.
      • createA128GcmParameters

        public static DecryptParameters createA128GcmParameters​(byte[] ciphertext,
                                                                byte[] iv,
                                                                byte[] authenticationTag,
                                                                byte[] additionalAuthenticatedData)
        Factory method to create an instance of DecryptParameters with the given parameters for EncryptionAlgorithm.A128GCM.
        Parameters:
        ciphertext - The content to be decrypted.
        iv - Initialization vector for the decryption operation.
        authenticationTag - The tag to authenticate when performing decryption.
        additionalAuthenticatedData - Additional data to authenticate when using authenticated crypto algorithms.
        Returns:
        The DecryptParameters.
      • createA192GcmParameters

        public static DecryptParameters createA192GcmParameters​(byte[] ciphertext,
                                                                byte[] iv,
                                                                byte[] authenticationTag)
        Factory method to create an instance of DecryptParameters with the given parameters for EncryptionAlgorithm.A192GCM.
        Parameters:
        ciphertext - The content to be decrypted.
        iv - Initialization vector for the decryption operation.
        authenticationTag - The tag to authenticate when performing decryption.
        Returns:
        The DecryptParameters.
      • createA192GcmParameters

        public static DecryptParameters createA192GcmParameters​(byte[] ciphertext,
                                                                byte[] iv,
                                                                byte[] authenticationTag,
                                                                byte[] additionalAuthenticatedData)
        Factory method to create an instance of DecryptParameters with the given parameters for EncryptionAlgorithm.A192GCM.
        Parameters:
        ciphertext - The content to be decrypted.
        iv - Initialization vector for the decryption operation.
        authenticationTag - The tag to authenticate when performing decryption.
        additionalAuthenticatedData - Additional data to authenticate when using authenticated crypto algorithms.
        Returns:
        The DecryptParameters.
      • createA256GcmParameters

        public static DecryptParameters createA256GcmParameters​(byte[] ciphertext,
                                                                byte[] iv,
                                                                byte[] authenticationTag)
        Factory method to create an instance of DecryptParameters with the given parameters for EncryptionAlgorithm.A256GCM.
        Parameters:
        ciphertext - The content to be decrypted.
        iv - Initialization vector for the decryption operation.
        authenticationTag - The tag to authenticate when performing decryption.
        Returns:
        The DecryptParameters.
      • createA256GcmParameters

        public static DecryptParameters createA256GcmParameters​(byte[] ciphertext,
                                                                byte[] iv,
                                                                byte[] authenticationTag,
                                                                byte[] additionalAuthenticatedData)
        Factory method to create an instance of DecryptParameters with the given parameters for EncryptionAlgorithm.A256GCM.
        Parameters:
        ciphertext - The content to be decrypted.
        iv - Initialization vector for the decryption operation.
        authenticationTag - The tag to authenticate when performing decryption.
        additionalAuthenticatedData - Additional data to authenticate when using authenticated crypto algorithms.
        Returns:
        The DecryptParameters.
      • getAlgorithm

        public EncryptionAlgorithm getAlgorithm()
        The algorithm to be used for decryption.
        Returns:
        The algorithm to be used for decryption.
      • getCipherText

        public byte[] getCipherText()
        Get the content to be decrypted.
        Returns:
        The content to be decrypted.
      • getIv

        public byte[] getIv()
        Get the initialization vector to be used in the decryption operation using a symmetric algorithm.
        Returns:
        The initialization vector.
      • getAdditionalAuthenticatedData

        public byte[] getAdditionalAuthenticatedData()
        Get additional data to authenticate when performing decryption with an authenticated algorithm.
        Returns:
        The additional authenticated data.
      • getAuthenticationTag

        public byte[] getAuthenticationTag()
        Get the tag to authenticate when performing decryption with an authenticated algorithm.
        Returns:
        The authentication tag.