IncrementalHash.CreateHMAC Metoda

Definice

Přetížení

CreateHMAC(HashAlgorithmName, Byte[])

IncrementalHash Vytvoří algoritmus HMAC (Hash-based Message Authentication Code) pomocí zadaného algoritmu hash a klíče.

CreateHMAC(HashAlgorithmName, ReadOnlySpan<Byte>)

IncrementalHash Vytvořte pro algoritmus HMAC (Hash-based Message Authentication Code) využívající algoritmus hash zadaný hashAlgorithma klíč určený .key

CreateHMAC(HashAlgorithmName, Byte[])

IncrementalHash Vytvoří algoritmus HMAC (Hash-based Message Authentication Code) pomocí zadaného algoritmu hash a klíče.

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

Název algoritmu hash, který se má provést v rámci HMAC.

key
Byte[]

Tajný klíč pro HMAC. Klíč může mít libovolnou délku, ale klíč delší než velikost výstupu zadaného algoritmu hash bude hashován k odvození klíče správné velikosti. Proto doporučená velikost tajného klíče je výstupní velikost zadaného algoritmu hash.

Návraty

IncrementalHash

Instance IncrementalHash třídy připravená k výpočtu zadaného hash algoritmu.

Atributy

Výjimky

key je null.

hashAlgorithm.Name je null nebo prázdný řetězec.

hashAlgorithm není známý algoritmus hash.

Platí pro

CreateHMAC(HashAlgorithmName, ReadOnlySpan<Byte>)

IncrementalHash Vytvořte pro algoritmus HMAC (Hash-based Message Authentication Code) využívající algoritmus hash zadaný hashAlgorithma klíč určený .key

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

Název algoritmu hash, který se má provést v rámci HMAC.

key
ReadOnlySpan<Byte>

Tajný klíč pro HMAC. Klíč může mít libovolnou délku, ale klíč delší než velikost výstupu algoritmu hash určeného hashAlgorithm hodnotou hash bude hashován (pomocí algoritmu určeného ) hashAlgorithmk odvození klíče správné velikosti. Proto doporučená velikost tajného klíče je výstupní velikost hodnoty hash zadané hodnotou hashAlgorithm.

Návraty

IncrementalHash

Instance hash pro výpočet algoritmu hash určeného parametrem hashAlgorithm.

Atributy

Výjimky

hashAlgorithm.Name je null nebo prázdný řetězec.

hashAlgorithm není známý algoritmus hash.

Platí pro