Aracılığıyla paylaş


ECDiffieHellmanCng.DeriveKeyFromHmac Yöntem

Tanım

İsteğe bağlı önceden eklenen veya eklenen verilerle belirtilen HMAC (Karma Tabanlı İleti Kimlik Doğrulama Kodu) algoritmasını kullanarak anahtar türetmesi 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 eklenmek için bir değer.

secretAppend
Byte[]

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

Döndürülenler

Byte[]

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

Özel durumlar

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

-veya-

hashAlgorithm parametresi bir karma belirtmez.

otherPartyPublicKey, null değeridir.

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

-veya-

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

Şunlara uygulanır