RSAPKCS1SignatureFormatter.SetKey(AsymmetricAlgorithm) Method

Definition

Sets the private key to use for creating the signature.

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 CreateSignature.

Applies to

See also