ECDiffieHellman.DeriveKeyFromHmac Metoda

Definicja

Wykonuje wyprowadzanie klucza przy użyciu określonego algorytmu HMAC (kod uwierzytelniania komunikatów oparty na skrótach).

Przeciążenia

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

Po zaimplementowaniu w klasie pochodnej, wykonuje wyprowadzanie klucza przy użyciu określonego algorytmu HMAC (kod uwierzytelniania komunikatów oparty na skrótach) z opcjonalnymi wstępnie dodanymi lub dołączonymi danymi.

DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[])

Wykonuje wyprowadzanie klucza przy użyciu określonego algorytmu HMAC (kod uwierzytelniania komunikatów oparty na skrótach).

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

Źródło:
ECDiffieHellman.cs
Źródło:
ECDiffieHellman.cs
Źródło:
ECDiffieHellman.cs

Po zaimplementowaniu w klasie pochodnej, wykonuje wyprowadzanie klucza przy użyciu określonego algorytmu HMAC (kod uwierzytelniania komunikatów oparty na skrótach) z opcjonalnymi wstępnie dodanymi lub dołączonymi danymi.

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

Parametry

otherPartyPublicKey
ECDiffieHellmanPublicKey

Klucz publiczny drugiej strony.

hashAlgorithm
HashAlgorithmName

Algorytm skrótu używany do uzyskiwania materiału klucza.

hmacKey
Byte[]

Klucz dla HMAC.

secretPrepend
Byte[]

Wartość, która ma poprzedzać pochodny wpis tajny przed utworzeniem skrótu.

secretAppend
Byte[]

Wartość, która ma być dołączana do pochodnego wpisu tajnego przed utworzeniem skrótu.

Zwraca

Byte[]

Klucz HMAC wspólnego wpisu tajnego po wstępnego dołączania lub dołączania danych zgodnie z żądaniem.

Wyjątki

Klasa pochodna musi zastąpić tę metodę.

Krzywa używana przez otherPartyPublicKey program ma inny rozmiar niż krzywa od tego klucza.

-lub-

Parametr hashAlgorithm nie określa skrótu.

otherPartyPublicKey to null.

Krzywa używana przez otherPartyPublicKey element jest inna niż krzywa od tego klucza.

-lub-

To wystąpienie reprezentuje tylko klucz publiczny.

Uwagi

Ta metoda wewnętrznie wykonuje krzywą eliptyczną Diffie-Hellman kluczową umowę w celu utworzenia wspólnego wpisu tajnego (z).

Gdy hmacKey parametr ma nullwartość zwracaną z tej metody, jest wynikiem HMAC-HASH(z, secretPrepend || z || secretAppend) użycia określonego algorytmu HMAC, gdzie || oznacza łączenie. W przeciwnym razie zwracana wartość z tej metody jest wynikiem HMAC-HASH(hmacKey, secretPrepend || z || secretAppend).

Jeśli wartość parametru secretPrepend lub secretAppend jest null, są one traktowane jako puste tablice.

Dotyczy

DeriveKeyFromHmac(ECDiffieHellmanPublicKey, HashAlgorithmName, Byte[])

Źródło:
ECDiffieHellman.cs
Źródło:
ECDiffieHellman.cs
Źródło:
ECDiffieHellman.cs

Wykonuje wyprowadzanie klucza przy użyciu określonego algorytmu HMAC (kod uwierzytelniania komunikatów oparty na skrótach).

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

Parametry

otherPartyPublicKey
ECDiffieHellmanPublicKey

Klucz publiczny drugiej strony.

hashAlgorithm
HashAlgorithmName

Algorytm skrótu używany do uzyskiwania materiału klucza.

hmacKey
Byte[]

Klucz dla HMAC.

Zwraca

Byte[]

HMAC wspólnego wpisu tajnego.

Wyjątki

Krzywa używana przez otherPartyPublicKey program ma inny rozmiar niż krzywa od tego klucza.

-lub-

Parametr hashAlgorithm nie określa skrótu.

otherPartyPublicKey to null.

Krzywa używana przez otherPartyPublicKey element jest inna niż krzywa od tego klucza.

-lub-

To wystąpienie reprezentuje tylko klucz publiczny.

Uwagi

To przeciążenie wywołuje metodę DeriveKeyFromHmac przekazującą null jako wartości prepend i append.

Dotyczy