RSAPKCS1KeyExchangeDeformatter.SetKey(AsymmetricAlgorithm) 方法

定义

设置用于解密机密信息的私钥。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)

参数

key
AsymmetricAlgorithm

包含私钥的 RSA 算法的实例。The instance of the RSA algorithm that holds the private key.

例外

keynullkey is null.

注解

在调用之前,必须指定一个密钥 DecryptKeyExchangeYou must specify a key before calling DecryptKeyExchange.

适用于