EncryptedXml.GetDecryptionIV Method (EncryptedData, String)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

Namespace:   System.Security.Cryptography.Xml
Assembly:  System.Security (in System.Security.dll)

public virtual byte[] GetDecryptionIV(
	EncryptedData encryptedData,
	string symmetricAlgorithmUri
)

Parameters

encryptedData
Type: System.Security.Cryptography.Xml.EncryptedData

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

symmetricAlgorithmUri
Type: System.String

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

Return Value

Type: System.Byte[]

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

Exception Condition
ArgumentNullException

The value of the encryptedData parameter is null.

CryptographicException

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.

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.

.NET Framework
Available since 2.0
Return to top
Show: