英語で読む

次の方法で共有


ECDiffieHellmanCng.DeriveSecretAgreementHandle メソッド

定義

二者の間で生成された秘密協定のハンドルを取得します。

オーバーロード

DeriveSecretAgreementHandle(ECDiffieHellmanPublicKey)

相手の公開キーを格納した ECDiffieHellmanPublicKey オブジェクトを指定した場合に、二者の間で生成された秘密協定のハンドルを取得します。

DeriveSecretAgreementHandle(CngKey)

相手の公開キーを格納した CngKey オブジェクトを指定した場合に、二者の間で生成された秘密協定のハンドルを取得します。

注釈

メソッドのオーバーロードは DeriveSecretAgreementHandle 、キー マテリアルではなく生のシークレット 契約へのハンドルを必要とする上級ユーザー向けです。 シークレット アグリーメント ハンドルは、プラットフォーム呼び出しで使用して、 クラスによってラップされていない作業を ECDiffieHellmanCng 実行できます。

DeriveSecretAgreementHandle(ECDiffieHellmanPublicKey)

ソース:
Cng.NotSupported.cs
ソース:
Cng.NotSupported.cs
ソース:
Cng.NotSupported.cs

相手の公開キーを格納した ECDiffieHellmanPublicKey オブジェクトを指定した場合に、二者の間で生成された秘密協定のハンドルを取得します。

C#
public Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle DeriveSecretAgreementHandle(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey);

パラメーター

otherPartyPublicKey
ECDiffieHellmanPublicKey

キー交換で相手から取得した公開キー。

戻り値

秘密協定を識別するハンドル。 現在のオブジェクトの秘密キーと指定した公開キーから、この情報は計算されます。

例外

otherPartyPublicKeynullです。

otherPartyPublicKeyECDiffieHellmanPublicKey キーではありません。

適用対象

.NET 9 およびその他のバージョン
製品 バージョン
.NET 6, 7, 8, 9
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.1 (package-provided)
Windows Desktop 3.0, 3.1, 5

DeriveSecretAgreementHandle(CngKey)

ソース:
Cng.NotSupported.cs
ソース:
Cng.NotSupported.cs
ソース:
Cng.NotSupported.cs

相手の公開キーを格納した CngKey オブジェクトを指定した場合に、二者の間で生成された秘密協定のハンドルを取得します。

C#
public Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle DeriveSecretAgreementHandle(System.Security.Cryptography.CngKey otherPartyPublicKey);
C#
[System.Security.SecurityCritical]
public Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle DeriveSecretAgreementHandle(System.Security.Cryptography.CngKey otherPartyPublicKey);

パラメーター

otherPartyPublicKey
CngKey

キー交換で相手から取得した ECDH (Elliptic Curve Diffie-Hellman) キーの公開部分を格納したオブジェクト。

戻り値

秘密協定を識別するハンドル。 現在のオブジェクトの秘密キーと指定した公開キーから、この情報は計算されます。

属性

例外

otherPartyPublicKeynullです。

otherPartyPublicKey が ECDH キーではありません。または正しいサイズではありません。

上記以外のすべてのエラー。

適用対象

.NET 9 およびその他のバージョン
製品 バージョン
.NET 6, 7, 8, 9
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.1 (package-provided)
Windows Desktop 3.0, 3.1, 5