ECDiffieHellmanCng.DeriveKeyTls 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
使用 TLS(傳輸層安全)1.1 PRF(Pseudo-Random 函數)執行金鑰推導。
public:
override cli::array <System::Byte> ^ DeriveKeyTls(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey, cli::array <System::Byte> ^ prfLabel, cli::array <System::Byte> ^ prfSeed);
public override byte[] DeriveKeyTls(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, byte[] prfLabel, byte[] prfSeed);
override this.DeriveKeyTls : System.Security.Cryptography.ECDiffieHellmanPublicKey * byte[] * byte[] -> byte[]
Public Overrides Function DeriveKeyTls (otherPartyPublicKey As ECDiffieHellmanPublicKey, prfLabel As Byte(), prfSeed As Byte()) As Byte()
參數
- otherPartyPublicKey
- ECDiffieHellmanPublicKey
對方的公開金鑰。
- prfLabel
- Byte[]
ASCII 編碼的 PRF 標籤。
- prfSeed
- Byte[]
64 位元組的 PRF 種子。
傳回
Byte[]
從 TLS 1.1 PRF 取得的前 48 位元組,使用共享秘密作為金鑰。
例外狀況
必須有一個衍生類別覆寫此方法。
所 otherPartyPublicKey 使用的曲線大小與此鍵的曲線不同。
otherPartyPublicKey,prfLabel或prfSeed是。null
prfSeed 長度並非精確的 64 位元組。
-或-
所 otherPartyPublicKey 使用的曲線與此鍵的曲線不同。
-或-
此實例僅代表公鑰。