Share via


ECDiffieHellman.DeriveKeyFromHmac Yöntem

Tanım

Belirtilen HMAC (Karma Tabanlı İleti Kimlik Doğrulama Kodu) algoritmasını kullanarak anahtar türetmesi gerçekleştirir.

Aşırı Yüklemeler

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

Türetilmiş bir sınıfta uygulandığında, isteğe bağlı olarak önceden eklenmiş veya eklenmiş verilerle belirtilen HMAC (Karma Tabanlı İleti Kimlik Doğrulama Kodu) algoritmasını kullanarak anahtar türetme gerçekleştirir.

DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[])

Belirtilen HMAC (Karma Tabanlı İleti Kimlik Doğrulama Kodu) algoritmasını kullanarak anahtar türetmesi gerçekleştirir.

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

Kaynak:
ECDiffieHellman.cs
Kaynak:
ECDiffieHellman.cs
Kaynak:
ECDiffieHellman.cs

Türetilmiş bir sınıfta uygulandığında, isteğe bağlı olarak önceden eklenmiş veya eklenmiş verilerle belirtilen HMAC (Karma Tabanlı İleti Kimlik Doğrulama Kodu) algoritmasını kullanarak anahtar türetme gerçekleştirir.

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

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

Türetilmiş bir sınıf bu yöntemi geçersiz kılmalıdır.

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.

Açıklamalar

Bu yöntem, paylaşılan gizli diziyi () oluşturmak için Eliptik Eğri Diffie-Hellman anahtar sözleşmesini dahiliz olarak gerçekleştirir.

olduğunda hmacKeynull, bu yöntemden döndürülen değer, birleştirmeyi işaret eden || belirtilen HMAC algoritmasını kullanmanın sonucudurHMAC-HASH(z, secretPrepend || z || secretAppend). Aksi takdirde, bu yöntemden döndürülen değer sonucunu verir HMAC-HASH(hmacKey, secretPrepend || z || secretAppend).

veya secretAppend değeri secretPrepend isenull, bunlar boş diziler olarak kabul edilir.

Şunlara uygulanır

DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[])

Kaynak:
ECDiffieHellman.cs
Kaynak:
ECDiffieHellman.cs
Kaynak:
ECDiffieHellman.cs

Belirtilen HMAC (Karma Tabanlı İleti Kimlik Doğrulama Kodu) algoritmasını kullanarak anahtar türetmesi gerçekleştirir.

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

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ı.

Döndürülenler

Byte[]

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.

Açıklamalar

Bu aşırı yükleme, prepend ve append değerleri olarak geçen null yöntemini çağırırDeriveKeyFromHmac.

Şunlara uygulanır