Rediger

Del via


RSAOAEPKeyExchangeDeformatter.SetKey(AsymmetricAlgorithm) Method

Definition

Sets the private key to use for decrypting the secret information.

public:
 override void SetKey(System::Security::Cryptography::AsymmetricAlgorithm ^ key);
public override void SetKey (System.Security.Cryptography.AsymmetricAlgorithm key);
override this.SetKey : System.Security.Cryptography.AsymmetricAlgorithm -> unit
Public Overrides Sub SetKey (key As AsymmetricAlgorithm)

Parameters

key
AsymmetricAlgorithm

The instance of the RSA algorithm that holds the private key.

Exceptions

key is null.

Remarks

You must set a key before calling DecryptKeyExchange.

Applies to

See also