Rediger

Del via


RSAPKCS1KeyExchangeFormatter.SetKey(AsymmetricAlgorithm) Method

Definition

Sets the public key to use for encrypting the key exchange data.

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 public key.

Exceptions

key is null.

Remarks

You must set the key before calling CreateKeyExchange.

Applies to

See also