Bagikan melalui


ECDiffieHellmanOpenSsl.DeriveKeyTls Metode

Definisi

Melakukan derivasi kunci menggunakan TLS (Transport Layer Security) 1.1 PRF (Pseudo-Random Function).

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()

Parameter

otherPartyPublicKey
ECDiffieHellmanPublicKey

Kunci umum pihak lain.

prfLabel
Byte[]

Label PRF yang dikodekan ASCII.

prfSeed
Byte[]

Benih PRF 64-byte.

Mengembalikan

Byte[]

48 byte pertama dari TLS 1.1 PRF, menggunakan rahasia bersama sebagai kunci.

Pengecualian

Kelas turunan harus mengambil alih metode ini.

Kurva yang digunakan oleh otherPartyPublicKey memiliki ukuran yang berbeda dari kurva dari kunci ini.

otherPartyPublicKey, prfLabel atau prfSeed adalah null.

prfSeed panjangnya tidak tepat 64 byte.

-atau-

Kurva yang digunakan oleh otherPartyPublicKey berbeda dari kurva dari kunci ini.

-atau-

Instans ini hanya mewakili kunci umum.

Berlaku untuk