ECDiffieHellman.DeriveKeyMaterial(ECDiffieHellmanPublicKey) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在衍生類別中實作時,依據共用密碼來執行金鑰衍生。
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
所使用曲線與此金鑰的曲線大小不同。
otherPartyPublicKey
為 null
。
備註
這個方法的預設行為相當於呼叫 DeriveKeyFromHash 將 SHA-256 指定為雜湊演算法,且沒有前面加上或附加值。 某些實作允許變更這個方法的行為,而且建議呼叫端呼叫哪一個方法明確指出它會執行所需的金鑰衍生。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應