IncrementalHash.CreateHMAC Metoda

Definicja

Przeciążenia

CreateHMAC(HashAlgorithmName, Byte[])

IncrementalHash Tworzy algorytm uwierzytelniania komunikatów oparty na skrótach (HMAC) przy użyciu określonego algorytmu skrótu i klucza.

CreateHMAC(HashAlgorithmName, ReadOnlySpan<Byte>)

IncrementalHash Twórca algorytm uwierzytelniania komunikatów oparty na skrótach (HMAC) korzystający z algorytmu skrótu określonego przez element i klucza określonego przez hashAlgorithmkey.

CreateHMAC(HashAlgorithmName, Byte[])

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

IncrementalHash Tworzy algorytm uwierzytelniania komunikatów oparty na skrótach (HMAC) przy użyciu określonego algorytmu skrótu i klucza.

public:
 static System::Security::Cryptography::IncrementalHash ^ CreateHMAC(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, cli::array <System::Byte> ^ key);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.IncrementalHash CreateHMAC (System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] key);
public static System.Security.Cryptography.IncrementalHash CreateHMAC (System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] key);
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member CreateHMAC : System.Security.Cryptography.HashAlgorithmName * byte[] -> System.Security.Cryptography.IncrementalHash
static member CreateHMAC : System.Security.Cryptography.HashAlgorithmName * byte[] -> System.Security.Cryptography.IncrementalHash
Public Shared Function CreateHMAC (hashAlgorithm As HashAlgorithmName, key As Byte()) As IncrementalHash

Parametry

hashAlgorithm
HashAlgorithmName

Nazwa algorytmu skrótu do wykonania w ramach HMAC.

key
Byte[]

Klucz tajny dla HMAC. Klucz może mieć dowolną długość, ale klucz dłuższy niż rozmiar wyjściowy określonego algorytmu skrótu zostanie skrót, aby uzyskać poprawnie rozmiar klucza. W związku z tym zalecanym rozmiarem klucza tajnego jest rozmiar wyjściowy określonego algorytmu skrótu.

Zwraca

Wystąpienie IncrementalHash klasy gotowe do obliczenia określonego algorytmu skrótu.

Atrybuty

Wyjątki

key to null.

hashAlgorithm.Name jest lub pusty null ciąg.

hashAlgorithm nie jest znanym algorytmem skrótu.

Dotyczy

CreateHMAC(HashAlgorithmName, ReadOnlySpan<Byte>)

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

IncrementalHash Twórca algorytm uwierzytelniania komunikatów oparty na skrótach (HMAC) korzystający z algorytmu skrótu określonego przez element i klucza określonego przez hashAlgorithmkey.

public:
 static System::Security::Cryptography::IncrementalHash ^ CreateHMAC(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<System::Byte> key);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.IncrementalHash CreateHMAC (System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key);
public static System.Security.Cryptography.IncrementalHash CreateHMAC (System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key);
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member CreateHMAC : System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> -> System.Security.Cryptography.IncrementalHash
static member CreateHMAC : System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> -> System.Security.Cryptography.IncrementalHash
Public Shared Function CreateHMAC (hashAlgorithm As HashAlgorithmName, key As ReadOnlySpan(Of Byte)) As IncrementalHash

Parametry

hashAlgorithm
HashAlgorithmName

Nazwa algorytmu skrótu do wykonania w ramach HMAC.

key
ReadOnlySpan<Byte>

Klucz tajny dla HMAC. Klucz może mieć dowolną długość, ale klucz dłuższy niż rozmiar wyjściowy algorytmu skrótu określonego przez hashAlgorithm polecenie zostanie skrót (przy użyciu algorytmu określonego przez hashAlgorithm) w celu uzyskania poprawnego rozmiaru klucza. W związku z tym zalecanym rozmiarem klucza tajnego jest rozmiar wyjściowy skrótu określonego przez .hashAlgorithm

Zwraca

Wystąpienie skrótu do obliczenia algorytmu skrótu określonego przez hashAlgorithm.

Atrybuty

Wyjątki

hashAlgorithm.Name jest lub null pusty ciąg.

hashAlgorithm nie jest znanym algorytmem skrótu.

Dotyczy