ECDiffieHellmanOpenSsl.DeriveKeyTls 方法

定義

使用 TLS (傳輸層安全性) 1.1 PRF (虛擬隨機函式) 來執行金鑰衍生。

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 所使用曲線與此金鑰的曲線大小不同。

otherPartyPublicKeyprfLabelprfSeednull

prfSeed 的長度不是正好 64 位元組。

-或-

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

-或-

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

適用於