ECDiffieHellmanCng.DeriveSecretAgreementHandle 方法

定義

取得雙方所產生密碼協議的控制代碼。

多載

DeriveSecretAgreementHandle(ECDiffieHellmanPublicKey)

取得雙方所產生密碼協議的控制代碼 (如果 ECDiffieHellmanPublicKey 物件包含另一方的公開金鑰)。

DeriveSecretAgreementHandle(CngKey)

取得雙方所產生密碼協議的控制代碼 (如果 CngKey 物件包含另一方的公開金鑰)。

備註

方法 DeriveSecretAgreementHandle 多載適用於需要原始秘密合約句柄的進階使用者,而不是密鑰數據。 秘密合約句柄可用於平台調用呼叫中,以執行類別未包裝 ECDiffieHellmanCng 的任何工作。

DeriveSecretAgreementHandle(ECDiffieHellmanPublicKey)

來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs

取得雙方所產生密碼協議的控制代碼 (如果 ECDiffieHellmanPublicKey 物件包含另一方的公開金鑰)。

public:
 Microsoft::Win32::SafeHandles::SafeNCryptSecretHandle ^ DeriveSecretAgreementHandle(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey);
public Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle DeriveSecretAgreementHandle (System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey);
member this.DeriveSecretAgreementHandle : System.Security.Cryptography.ECDiffieHellmanPublicKey -> Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle
Public Function DeriveSecretAgreementHandle (otherPartyPublicKey As ECDiffieHellmanPublicKey) As SafeNCryptSecretHandle

參數

otherPartyPublicKey
ECDiffieHellmanPublicKey

來自金鑰交換中另一方的公開金鑰。

傳回

密碼協議的控制代碼。 這項資訊是從目前物件的私密金鑰和指定的公開金鑰計算而得。

例外狀況

otherPartyPublicKeynull

otherPartyPublicKey 不是 ECDiffieHellmanPublicKey 金鑰。

適用於

DeriveSecretAgreementHandle(CngKey)

來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs

取得雙方所產生密碼協議的控制代碼 (如果 CngKey 物件包含另一方的公開金鑰)。

public:
 Microsoft::Win32::SafeHandles::SafeNCryptSecretHandle ^ DeriveSecretAgreementHandle(System::Security::Cryptography::CngKey ^ otherPartyPublicKey);
public Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle DeriveSecretAgreementHandle (System.Security.Cryptography.CngKey otherPartyPublicKey);
[System.Security.SecurityCritical]
public Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle DeriveSecretAgreementHandle (System.Security.Cryptography.CngKey otherPartyPublicKey);
member this.DeriveSecretAgreementHandle : System.Security.Cryptography.CngKey -> Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle
[<System.Security.SecurityCritical>]
member this.DeriveSecretAgreementHandle : System.Security.Cryptography.CngKey -> Microsoft.Win32.SafeHandles.SafeNCryptSecretHandle
Public Function DeriveSecretAgreementHandle (otherPartyPublicKey As CngKey) As SafeNCryptSecretHandle

參數

otherPartyPublicKey
CngKey

物件,該物件包含金鑰交換中,另一方 Elliptic Curve Diffie-Hellman (ECDH) 金鑰的公開部分。

傳回

密碼協議的控制代碼。 這項資訊是從目前物件的私密金鑰和指定的公開金鑰計算而得。

屬性

例外狀況

otherPartyPublicKeynull

otherPartyPublicKey 不是 ECDH 金鑰,或其大小不正確。

所有其他錯誤。

適用於