RSAOAEPKeyExchangeFormatter.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です。

次のコード例では、 メソッドを使用 SetKey して復号化用のキーを設定する方法を RSA 示します。 このコード例は、RSAOAEPKeyExchangeFormatter クラスのために提供されている大規模な例の一部です。

RSA^ key = RSA::Create();
rsaFormatter->SetKey( key );
RSA key = RSA.Create();
rsaFormatter.SetKey(key);
Dim key As RSA = RSA.Create()
rsaFormatter.SetKey(key)

注釈

を呼び出す CreateKeyExchange前に、キーを設定する必要があります。

適用対象

こちらもご覧ください