ECDiffieHellman.DeriveKeyMaterial(ECDiffieHellmanPublicKey) 方法

定義

在衍生類別中實作時,依據共用密碼來執行金鑰衍生。

public:
 virtual cli::array <System::Byte> ^ DeriveKeyMaterial(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey);
public:
 abstract cli::array <System::Byte> ^ DeriveKeyMaterial(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey);
public virtual byte[] DeriveKeyMaterial (System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey);
public abstract byte[] DeriveKeyMaterial (System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey);
abstract member DeriveKeyMaterial : System.Security.Cryptography.ECDiffieHellmanPublicKey -> byte[]
override this.DeriveKeyMaterial : System.Security.Cryptography.ECDiffieHellmanPublicKey -> byte[]
abstract member DeriveKeyMaterial : System.Security.Cryptography.ECDiffieHellmanPublicKey -> byte[]
Public Overridable Function DeriveKeyMaterial (otherPartyPublicKey As ECDiffieHellmanPublicKey) As Byte()
Public MustOverride Function DeriveKeyMaterial (otherPartyPublicKey As ECDiffieHellmanPublicKey) As Byte()

參數

otherPartyPublicKey
ECDiffieHellmanPublicKey

另一方的公開金鑰。

傳回

Byte[]

使用共用密碼作為輸入的金鑰衍生函式結果。

例外狀況

otherPartyPublicKey 所使用曲線與此金鑰的曲線大小不同。

otherPartyPublicKeynull

otherPartyPublicKey 所使用曲線與此金鑰的曲線不同。

-或-

這個執行個體只表示公開金鑰。

備註

這個方法的預設行為相當於呼叫 DeriveKeyFromHash 將 SHA-256 指定為雜湊演算法,且沒有前面加上或附加值。 某些實作允許變更這個方法的行為,而且建議呼叫端呼叫哪一個方法明確指出它會執行所需的金鑰衍生。

適用於