Bewerken

Delen via


EncryptedXml.GetDecryptionIV(EncryptedData, String) Method

Definition

Retrieves the decryption initialization vector (IV) from an EncryptedData object.

public:
 virtual cli::array <System::Byte> ^ GetDecryptionIV(System::Security::Cryptography::Xml::EncryptedData ^ encryptedData, System::String ^ symmetricAlgorithmUri);
public virtual byte[] GetDecryptionIV (System.Security.Cryptography.Xml.EncryptedData encryptedData, string? symmetricAlgorithmUri);
public virtual byte[] GetDecryptionIV (System.Security.Cryptography.Xml.EncryptedData encryptedData, string symmetricAlgorithmUri);
abstract member GetDecryptionIV : System.Security.Cryptography.Xml.EncryptedData * string -> byte[]
override this.GetDecryptionIV : System.Security.Cryptography.Xml.EncryptedData * string -> byte[]
Public Overridable Function GetDecryptionIV (encryptedData As EncryptedData, symmetricAlgorithmUri As String) As Byte()

Parameters

encryptedData
EncryptedData

The EncryptedData object that contains the initialization vector (IV) to retrieve.

symmetricAlgorithmUri
String

The Uniform Resource Identifier (URI) that describes the cryptographic algorithm associated with the encryptedData value.

Returns

Byte[]

A byte array that contains the decryption initialization vector (IV).

Exceptions

The value of the encryptedData parameter is null.

The value of the encryptedData parameter has an EncryptionMethod property that is null.

-or-

The value of the symmetricAlgorithmUrisymAlgUri parameter is not a supported algorithm.

Remarks

Given an EncryptedData object, this method retrieves the decryption initialization vector (IV). The default behavior retrieves the IV as the first bytes of the CipherValue byte array.

For a list of Uniform Resource Identifier (URI) values supported by the symmetricAlgorithmUri parameter, see the list of constant fields associated with the EncryptedXml class.

Applies to