Class DecryptParameters

java.lang.Object
com.azure.security.keyvault.keys.cryptography.models.DecryptParameters

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

    • createA128CbcParameters

      public static DecryptParameters createA128CbcParameters(byte[] ciphertext, byte[] iv)
      Factory method to create an instance of DecryptParameters with the given parameters for EncryptionAlgorithm.A128CBC.
      Parameters:
      ciphertext - The content to be decrypted. Microsoft recommends you not use CBC without first ensuring the integrity of the ciphertext using an HMAC, for example. See https://docs.microsoft.com/dotnet/standard/security/vulnerabilities-cbc-mode for more information.
      iv - Initialization vector for the decryption operation.
      Returns:
      The DecryptParameters.
    • createA128CbcPadParameters

      public static DecryptParameters createA128CbcPadParameters(byte[] ciphertext, byte[] iv)
      Factory method to create an instance of DecryptParameters with the given parameters for EncryptionAlgorithm.A128CBCPAD.
      Parameters:
      ciphertext - The content to be decrypted. Microsoft recommends you not use CBC without first ensuring the integrity of the ciphertext using an HMAC, for example. See https://docs.microsoft.com/dotnet/standard/security/vulnerabilities-cbc-mode for more information.
      iv - Initialization vector for the decryption operation.
      Returns:
      The DecryptParameters.
    • 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.
    • createA192CbcParameters

      public static DecryptParameters createA192CbcParameters(byte[] ciphertext, byte[] iv)
      Factory method to create an instance of DecryptParameters with the given parameters for EncryptionAlgorithm.A192CBC.
      Parameters:
      ciphertext - The content to be decrypted. Microsoft recommends you not use CBC without first ensuring the integrity of the ciphertext using an HMAC, for example. See https://docs.microsoft.com/dotnet/standard/security/vulnerabilities-cbc-mode for more information.
      iv - Initialization vector for the decryption operation.
      Returns:
      The DecryptParameters.
    • createA192CbcPadParameters

      public static DecryptParameters createA192CbcPadParameters(byte[] ciphertext, byte[] iv)
      Factory method to create an instance of DecryptParameters with the given parameters for EncryptionAlgorithm.A192CBCPAD.
      Parameters:
      ciphertext - The content to be decrypted. Microsoft recommends you not use CBC without first ensuring the integrity of the ciphertext using an HMAC, for example. See https://docs.microsoft.com/dotnet/standard/security/vulnerabilities-cbc-mode for more information.
      iv - Initialization vector for the decryption operation.
      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.
    • createA256CbcParameters

      public static DecryptParameters createA256CbcParameters(byte[] ciphertext, byte[] iv)
      Factory method to create an instance of DecryptParameters with the given parameters for EncryptionAlgorithm.A256CBC.
      Parameters:
      ciphertext - The content to be decrypted. Microsoft recommends you not use CBC without first ensuring the integrity of the ciphertext using an HMAC, for example. See https://docs.microsoft.com/dotnet/standard/security/vulnerabilities-cbc-mode for more information.
      iv - Initialization vector for the decryption operation.
      Returns:
      The DecryptParameters.
    • createA256CbcPadParameters

      public static DecryptParameters createA256CbcPadParameters(byte[] ciphertext, byte[] iv)
      Factory method to create an instance of DecryptParameters with the given parameters for EncryptionAlgorithm.A256CBCPAD.
      Parameters:
      ciphertext - The content to be decrypted. Microsoft recommends you not use CBC without first ensuring the integrity of the ciphertext using an HMAC, for example. See https://docs.microsoft.com/dotnet/standard/security/vulnerabilities-cbc-mode for more information.
      iv - Initialization vector for the decryption operation.
      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.
    • createRsa15Parameters

      public static DecryptParameters createRsa15Parameters(byte[] ciphertext)
      Factory method to create an instance of DecryptParameters with the given parameters for EncryptionAlgorithm.RSA1_5.
      Parameters:
      ciphertext - The content to be decrypted.
      Returns:
      The DecryptParameters.
    • createRsaOaepParameters

      public static DecryptParameters createRsaOaepParameters(byte[] ciphertext)
      Factory method to create an instance of DecryptParameters with the given parameters for EncryptionAlgorithm.RSA_OAEP.
      Parameters:
      ciphertext - The content to be decrypted.
      Returns:
      The DecryptParameters.
    • createRsaOaep256Parameters

      public static DecryptParameters createRsaOaep256Parameters(byte[] ciphertext)
      Factory method to create an instance of DecryptParameters with the given parameters for EncryptionAlgorithm.RSA_OAEP_256.
      Parameters:
      ciphertext - The content to be decrypted.
      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.