IncrementalHash.CreateHMAC Metod

Definition

Överlagringar

Name Description
CreateHMAC(HashAlgorithmName, Byte[])

Skapa en IncrementalHash för den Hash-baserade HMAC-algoritmen (Message Authentication Code) med hash-algoritmen som anges av hashAlgorithmoch en nyckel som anges av key.

CreateHMAC(HashAlgorithmName, ReadOnlySpan<Byte>)

Skapa en IncrementalHash för den Hash-baserade HMAC-algoritmen (Message Authentication Code) med hash-algoritmen som anges av hashAlgorithmoch en nyckel som anges av key.

CreateHMAC(HashAlgorithmName, Byte[])

Källa:
IncrementalHash.cs
Källa:
IncrementalHash.cs
Källa:
IncrementalHash.cs
Källa:
IncrementalHash.cs
Källa:
IncrementalHash.cs

Skapa en IncrementalHash för den Hash-baserade HMAC-algoritmen (Message Authentication Code) med hash-algoritmen som anges av hashAlgorithmoch en nyckel som anges av key.

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

Parametrar

hashAlgorithm
HashAlgorithmName

Namnet på hash-algoritmen som ska utföras i HMAC.

key
Byte[]

Den hemliga nyckeln för HMAC. Nyckeln kan vara valfri längd, men en nyckel som är längre än utdatastorleken för hash-algoritmen som anges av hashAlgorithm hashas (med hjälp av algoritmen som anges av hashAlgorithm) för att härleda en nyckel med rätt storlek. Därför är den rekommenderade storleken på den hemliga nyckeln utdatastorleken för hashen som anges av hashAlgorithm.

Returer

En IncrementalHash instans som är redo att beräkna hash-algoritmen som anges av hashAlgorithm.

Attribut

Undantag

key är null.

hashAlgorithm.Name är null, eller den tomma strängen.

hashAlgorithm är inte en känd hash-algoritm.

Gäller för

CreateHMAC(HashAlgorithmName, ReadOnlySpan<Byte>)

Källa:
IncrementalHash.cs
Källa:
IncrementalHash.cs
Källa:
IncrementalHash.cs
Källa:
IncrementalHash.cs
Källa:
IncrementalHash.cs

Skapa en IncrementalHash för den Hash-baserade HMAC-algoritmen (Message Authentication Code) med hash-algoritmen som anges av hashAlgorithmoch en nyckel som anges av key.

public:
 static System::Security::Cryptography::IncrementalHash ^ CreateHMAC(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<System::Byte> key);
public static System.Security.Cryptography.IncrementalHash CreateHMAC(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.IncrementalHash CreateHMAC(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key);
static member CreateHMAC : System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> -> System.Security.Cryptography.IncrementalHash
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
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

Parametrar

hashAlgorithm
HashAlgorithmName

Namnet på hash-algoritmen som ska utföras i HMAC.

key
ReadOnlySpan<Byte>

Den hemliga nyckeln för HMAC.

Returer

En hash-instans för att beräkna hash-algoritmen som anges av hashAlgorithm.

Attribut

Undantag

hashAlgorithm.Name är null eller den tomma strängen.

hashAlgorithm är inte en känd hash-algoritm.

Gäller för