RsaSecurityKey.DecryptKey Method (String, Byte[])

 

Decrypts the specified encrypted key.

Namespace:   System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public override byte[] DecryptKey(
	string algorithm,
	byte[] keyData
)

Parameters

algorithm
Type: System.String

The cryptographic algorithm that was used to encrypt the key. The supported algorithms are RsaV15KeyWrap and RsaOaepKeyWrap.

keyData
Type: System.Byte[]

An array of Byte that contains the encrypted key.

Return Value

Type: System.Byte[]

An array of Byte that contains the decrypted key.

Exception Condition
CryptographicException

algorithm is not supported. The supported algorithms are RsaV15KeyWrap and RsaOaepKeyWrap.

ArgumentNullException

keyData is null.

.NET Framework
Available since 3.0
Return to top
Show: