IncrementalHash.CreateHMAC Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
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ý |
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
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ý hashAlgorithm
a 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 ) hashAlgorithm
k 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
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.