Share via


ECDiffieHellmanCng.DeriveKeyFromHmac Yöntem

Tanım

İsteğe bağlı önceden eklenmiş veya eklenmiş verilerle belirtilen HMAC (Karma Tabanlı İleti Kimlik Doğrulama Kodu) algoritmasını kullanarak anahtar türetme gerçekleştirir.

public:
 override 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 override byte[] DeriveKeyFromHmac (System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] hmacKey, byte[] secretPrepend, byte[] secretAppend);
public override byte[] DeriveKeyFromHmac (System.Security.Cryptography.ECDiffieHellmanPublicKey otherPartyPublicKey, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[]? hmacKey, byte[]? secretPrepend, byte[]? secretAppend);
override this.DeriveKeyFromHmac : System.Security.Cryptography.ECDiffieHellmanPublicKey * System.Security.Cryptography.HashAlgorithmName * byte[] * byte[] * byte[] -> byte[]
Public Overrides Function DeriveKeyFromHmac (otherPartyPublicKey As ECDiffieHellmanPublicKey, hashAlgorithm As HashAlgorithmName, hmacKey As Byte(), secretPrepend As Byte(), secretAppend As Byte()) As Byte()

Parametreler

otherPartyPublicKey
ECDiffieHellmanPublicKey

Diğer tarafın ortak anahtarı.

hashAlgorithm
HashAlgorithmName

Anahtar malzemeyi türetmek için kullanılacak karma algoritması.

hmacKey
Byte[]

HMAC anahtarı.

secretPrepend
Byte[]

Karma oluşturmadan önce türetilmiş gizli diziye önceden eklenmek için bir değer.

secretAppend
Byte[]

Karma oluşturmadan önce türetilmiş gizli diziye eklenecek değer.

Döndürülenler

Byte[]

İstendiği şekilde verileri önceden ekledikten veya ekledikten sonra paylaşılan gizli dizinin HMAC'i.

Özel durumlar

tarafından otherPartyPublicKey kullanılan eğri, bu anahtardan farklı bir boyuta sahiptir.

-veya-

hashAlgorithm parametresi bir karma belirtmiyor.

otherPartyPublicKey, null değeridir.

tarafından otherPartyPublicKey kullanılan eğri, bu anahtardan farklı.

-veya-

Bu örnek yalnızca bir ortak anahtarı temsil eder.

Şunlara uygulanır