Share via


RSAPKCS1KeyExchangeFormatter.SetKey(AsymmetricAlgorithm) 方法

定義

設定要用於將金鑰交換資料加密的公開金鑰。

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 演算法執行個體。

例外狀況

keynull

備註

您必須先設定金鑰,才能呼叫 CreateKeyExchange

適用於

另請參閱