Export (0) Print
Expand All

RsaSecurityKey.DecryptKey Method

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.

ExceptionCondition
CryptographicException

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

ArgumentNullException

keyData is null.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft