IncrementalHash.CreateHMAC Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Przeciążenia
CreateHMAC(HashAlgorithmName, Byte[]) |
IncrementalHash Tworzy algorytm dla algorytmu uwierzytelniania komunikatów opartego na skrótach (HMAC) przy użyciu określonego algorytmu skrótu i klucza. |
CreateHMAC(HashAlgorithmName, ReadOnlySpan<Byte>) |
Utwórz algorytm IncrementalHash dla algorytmu uwierzytelniania komunikatów opartego na skrótach (HMAC) przy użyciu algorytmu skrótu określonego przez |
CreateHMAC(HashAlgorithmName, Byte[])
- Źródło:
- IncrementalHash.cs
- Źródło:
- IncrementalHash.cs
- Źródło:
- IncrementalHash.cs
IncrementalHash Tworzy algorytm dla algorytmu uwierzytelniania komunikatów opartego 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 HMAC.
- key
- Byte[]
Klucz tajny dla HMAC. Klucz może mieć dowolną długość, ale klucz dłuższy niż rozmiar danych wyjściowych określonego algorytmu skrótu zostanie skrócony w celu uzyskania klucza o prawidłowym rozmiarze. W związku z tym zalecany rozmiar klucza tajnego to rozmiar danych wyjściowych 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 null
ciągiem lub ciągiem pustym.
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
Utwórz algorytm IncrementalHash dla algorytmu uwierzytelniania komunikatów opartego na skrótach (HMAC) przy użyciu algorytmu skrótu określonego przez hashAlgorithm
, i klucza określonego przez 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
Nazwa algorytmu skrótu do wykonania w HMAC.
- key
- ReadOnlySpan<Byte>
Klucz tajny dla HMAC. Klucz może być dowolną długością, ale klucz dłuższy niż rozmiar danych wyjściowych algorytmu skrótu określony przez hashAlgorithm
zostanie skrót (przy użyciu algorytmu określonego przez hashAlgorithm
), aby uzyskać klucz o prawidłowym rozmiarze. W związku z tym zalecany rozmiar klucza tajnego to rozmiar danych wyjściowych skrótu określony przez hashAlgorithm
.
Zwraca
Wystąpienie skrótu do obliczenia algorytmu skrótu określonego przez hashAlgorithm
.
- Atrybuty
Wyjątki
hashAlgorithm
.Name jest null
ciągiem lub ciągiem pustym.
hashAlgorithm
nie jest znanym algorytmem skrótu.
Dotyczy
Opinia
https://aka.ms/ContentUserFeedback.
Dostępne już wkrótce: W 2024 r. będziemy stopniowo wycofywać zgłoszenia z serwisu GitHub jako mechanizm przesyłania opinii na temat zawartości i zastępować go nowym systemem opinii. Aby uzyskać więcej informacji, sprawdź:Prześlij i wyświetl opinię dla