RSAPKCS1KeyExchangeDeformatter.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 specify a key before calling DecryptKeyExchange.

Applies to

See also