HMAC.Create Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Erstellt eine Instanz einer Implementierung eines Hash-basierten Nachrichtenauthentifizierungscodes (HMAC) .
Überlädt
| Name | Beschreibung |
|---|---|
| Create() |
Veraltet.
Veraltet.
Erstellt eine Instanz der Standardimplementierung eines Hash-basierten Nachrichtenauthentifizierungscodes (HMAC). |
| Create(String) |
Veraltet.
Erstellt eine Instanz der angegebenen Implementierung eines Hash-basierten Nachrichtenauthentifizierungscodes (HMAC). |
Create()
- Quelle:
- HMAC.cs
- Quelle:
- HMAC.cs
- Quelle:
- HMAC.cs
- Quelle:
- HMAC.cs
- Quelle:
- HMAC.cs
Achtung
The default implementation of this cryptography algorithm is not supported.
Achtung
The default implementation of this cryptography algorithm is not supported
Erstellt eine Instanz der Standardimplementierung eines Hash-basierten Nachrichtenauthentifizierungscodes (HMAC).
public:
static System::Security::Cryptography::HMAC ^ Create();
[System.Obsolete("The default implementation of this cryptography algorithm is not supported.", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.HMAC Create();
[System.Obsolete("The default implementation of this cryptography algorithm is not supported", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.HMAC Create();
public static System.Security.Cryptography.HMAC Create();
[<System.Obsolete("The default implementation of this cryptography algorithm is not supported.", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member Create : unit -> System.Security.Cryptography.HMAC
[<System.Obsolete("The default implementation of this cryptography algorithm is not supported", DiagnosticId="SYSLIB0007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member Create : unit -> System.Security.Cryptography.HMAC
static member Create : unit -> System.Security.Cryptography.HMAC
Public Shared Function Create () As HMAC
Gibt zurück
Eine neue SHA-1-Instanz, es sei denn, die Standardeinstellungen wurden mithilfe des <cryptoClass-Elements> geändert.
- Attribute
Ausnahmen
.NET Core 2.0 - 3.1 und .NET 5 und höher: In allen Fällen.
Hinweise
Diese Methode ist in .NET 5 und höheren Versionen veraltet.
Standardmäßig verwendet diese Überladung die SHA-1-Implementierung von HMAC. Wenn Sie eine andere Implementierung angeben möchten, verwenden Sie die Create(String) Überladung, die es Ihnen ermöglicht, stattdessen einen Algorithmusnamen anzugeben.
Aufgrund von Kollisionsproblemen mit SHA-1 empfiehlt Microsoft ein Sicherheitsmodell, das auf SHA-256 oder höher basiert.
Gilt für:
Create(String)
- Quelle:
- HMAC.cs
- Quelle:
- HMAC.cs
- Quelle:
- HMAC.cs
- Quelle:
- HMAC.cs
- Quelle:
- HMAC.cs
Achtung
Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.
Erstellt eine Instanz der angegebenen Implementierung eines Hash-basierten Nachrichtenauthentifizierungscodes (HMAC).
public:
static System::Security::Cryptography::HMAC ^ Create(System::String ^ algorithmName);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
[System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.HMAC? Create(string algorithmName);
public static System.Security.Cryptography.HMAC? Create(string algorithmName);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
public static System.Security.Cryptography.HMAC? Create(string algorithmName);
public static System.Security.Cryptography.HMAC Create(string algorithmName);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>]
[<System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member Create : string -> System.Security.Cryptography.HMAC
static member Create : string -> System.Security.Cryptography.HMAC
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>]
static member Create : string -> System.Security.Cryptography.HMAC
Public Shared Function Create (algorithmName As String) As HMAC
Parameter
- algorithmName
- String
Die zu verwendende HMAC-Implementierung. In der folgenden Tabelle sind die gültigen Werte für den algorithmName Parameter und die Algorithmen aufgeführt, zu der sie zugeordnet sind.
| Parameterwert | Implementiert |
|---|---|
| System.Security.Cryptography.HMAC | HMACSHA1 |
| System.Security.Cryptography.KeyedHashAlgorithm | HMACSHA1 |
| HMACMD5 | HMACMD5 |
| System.Security.Cryptography.HMACMD5 | HMACMD5 |
| HMACRIPEMD160 | HMACRIPEMD160 |
| System.Security.Cryptography.HMACRIPEMD160 | HMACRIPEMD160 |
| HMACSHA1 | HMACSHA1 |
| System.Security.Cryptography.HMACSHA1 | HMACSHA1 |
| HMACSHA256 | HMACSHA256 |
| System.Security.Cryptography.HMACSHA256 | HMACSHA256 |
| HMACSHA384 | HMACSHA384 |
| System.Security.Cryptography.HMACSHA384 | HMACSHA384 |
| HMACSHA512 | HMACSHA512 |
| System.Security.Cryptography.HMACSHA512 | HMACSHA512 |
| Mactripledes | MACTripleDES |
| System.Security.Cryptography.MACTripleDES | MACTripleDES |
Gibt zurück
Eine neue Instanz der angegebenen HMAC-Implementierung.
- Attribute
Hinweise
HMAC unterstützt eine Reihe von Hashalgorithmen, einschließlich MD5, SHA-1, SHA-256 und RIPEMD160. Die vollständige Liste finden Sie in den unterstützten Werten für den algorithmName Parameter.
Aufgrund von Kollisionsproblemen mit MD5 und SHA-1 empfiehlt Microsoft ein Sicherheitsmodell, das auf SHA-256 oder höher basiert.