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 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 |
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 hashAlgorithm
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 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
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