ECDiffieHellman.DeriveKeyFromHmac Metode

Definisi

Melakukan derivasi kunci menggunakan algoritma HMAC (Kode Autentikasi Pesan berbasis Hash) tertentu.

Overload

Nama Deskripsi
DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[], Byte[], Byte[])

Saat diimplementasikan dalam kelas turunan, melakukan derivasi kunci menggunakan algoritma HMAC (Kode Autentikasi Pesan berbasis Hash) tertentu dengan data opsional yang telah ditambahkan sebelumnya atau ditambahkan.

DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[])

Melakukan derivasi kunci menggunakan algoritma HMAC (Kode Autentikasi Pesan berbasis Hash) tertentu.

DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[], Byte[], Byte[])

Sumber:
ECDiffieHellman.cs
Sumber:
ECDiffieHellman.cs
Sumber:
ECDiffieHellman.cs
Sumber:
ECDiffieHellman.cs
Sumber:
ECDiffieHellman.cs

Saat diimplementasikan dalam kelas turunan, melakukan derivasi kunci menggunakan algoritma HMAC (Kode Autentikasi Pesan berbasis Hash) tertentu dengan data opsional yang telah ditambahkan sebelumnya atau ditambahkan.

public:
 virtual cli::array <System::Byte> ^ DeriveKeyFromHmac(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, cli::array <System::Byte> ^ hmacKey, cli::array <System::Byte> ^ secretPrepend, cli::array <System::Byte> ^ secretAppend);
public virtual byte[] DeriveKeyFromHmac(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? hmacKey, byte[]? secretPrepend, byte[]? secretAppend);
public virtual byte[] DeriveKeyFromHmac(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] hmacKey, byte[] secretPrepend, byte[] secretAppend);
abstract member DeriveKeyFromHmac : System.Security.Cryptography.ECDiffieHellmanPublicKey * System.Security.Cryptography.HashAlgorithmName * byte[] * byte[] * byte[] -> byte[]
override this.DeriveKeyFromHmac : System.Security.Cryptography.ECDiffieHellmanPublicKey * System.Security.Cryptography.HashAlgorithmName * byte[] * byte[] * byte[] -> byte[]
Public Overridable Function DeriveKeyFromHmac (otherPartyPublicKey As ECDiffieHellmanPublicKey, hashAlgorithm As HashAlgorithmName, hmacKey As Byte(), secretPrepend As Byte(), secretAppend As Byte()) As Byte()

Parameter

otherPartyPublicKey
ECDiffieHellmanPublicKey

Kunci umum pihak lain.

hashAlgorithm
HashAlgorithmName

Algoritma hash yang digunakan untuk mendapatkan materi utama.

hmacKey
Byte[]

Kunci untuk HMAC.

secretPrepend
Byte[]

Nilai yang akan ditambahkan ke rahasia turunan sebelum hashing.

secretAppend
Byte[]

Nilai untuk ditambahkan ke rahasia turunan sebelum hashing.

Mengembalikan

Byte[]

HMAC dari rahasia bersama setelah menambahkan atau menambahkan data seperti yang diminta.

Pengecualian

Kelas turunan harus mengambil alih metode ini.

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

-atau-

Parameter hashAlgorithm tidak menentukan hash.

otherPartyPublicKey adalah null.

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

-atau-

Instans ini hanya mewakili kunci publik.

Keterangan

Metode ini secara internal melakukan perjanjian kunci Diffie-Hellman Kurva Elips untuk menghasilkan rahasia bersama (z).

Ketika hmacKey adalah null, nilai pengembalian dari metode ini adalah hasil dari HMAC-HASH(z, secretPrepend || z || secretAppend) menggunakan algoritma HMAC yang ditentukan, di mana || menandakan perangkaian. Jika tidak, nilai pengembalian dari metode ini adalah hasil dari HMAC-HASH(hmacKey, secretPrepend || z || secretAppend).

Jika nilai secretPrepend atau secretAppend adalah null, nilai tersebut diperlakukan sebagai array kosong.

Berlaku untuk

DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[])

Sumber:
ECDiffieHellman.cs
Sumber:
ECDiffieHellman.cs
Sumber:
ECDiffieHellman.cs
Sumber:
ECDiffieHellman.cs
Sumber:
ECDiffieHellman.cs

Melakukan derivasi kunci menggunakan algoritma HMAC (Kode Autentikasi Pesan berbasis Hash) tertentu.

public:
 cli::array <System::Byte> ^ DeriveKeyFromHmac(System::Security::Cryptography::ECDiffieHellmanPublicKey ^ otherPartyPublicKey, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, cli::array <System::Byte> ^ hmacKey);
public byte[] DeriveKeyFromHmac(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? hmacKey);
public byte[] DeriveKeyFromHmac(System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] hmacKey);
member this.DeriveKeyFromHmac : System.Security.Cryptography.ECDiffieHellmanPublicKey * System.Security.Cryptography.HashAlgorithmName * byte[] -> byte[]
Public Function DeriveKeyFromHmac (otherPartyPublicKey As ECDiffieHellmanPublicKey, hashAlgorithm As HashAlgorithmName, hmacKey As Byte()) As Byte()

Parameter

otherPartyPublicKey
ECDiffieHellmanPublicKey

Kunci umum pihak lain.

hashAlgorithm
HashAlgorithmName

Algoritma hash yang digunakan untuk mendapatkan materi utama.

hmacKey
Byte[]

Kunci untuk HMAC.

Mengembalikan

Byte[]

HMAC dari rahasia bersama.

Pengecualian

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

-atau-

Parameter hashAlgorithm tidak menentukan hash.

otherPartyPublicKey adalah null.

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

-atau-

Instans ini hanya mewakili kunci publik.

Keterangan

Kelebihan beban ini memanggil metode yang DeriveKeyFromHmac melewati null sebagai nilai prepend dan tambahkan.

Berlaku untuk