Share via


KeyedHashAlgorithm.Create Methode

Definition

Erstellt eine Instanz der Implementierung eines schlüsselgebundenen Hashalgorithmus.

Überlädt

Create()
Veraltet.
Veraltet.

Erstellt eine Instanz der Standardimplementierung eines schlüsselgebundenen Hashalgorithmus.

Create(String)
Veraltet.

Erstellt eine Instanz der angegebenen Implementierung eines schlüsselgebundenen Hashalgorithmus.

Create()

Quelle:
KeyedHashAlgorithm.cs
Quelle:
KeyedHashAlgorithm.cs
Quelle:
KeyedHashAlgorithm.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 schlüsselgebundenen Hashalgorithmus.

public:
 static System::Security::Cryptography::KeyedHashAlgorithm ^ 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.KeyedHashAlgorithm 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.KeyedHashAlgorithm Create ();
public static System.Security.Cryptography.KeyedHashAlgorithm 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.KeyedHashAlgorithm
[<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.KeyedHashAlgorithm
static member Create : unit -> System.Security.Cryptography.KeyedHashAlgorithm
Public Shared Function Create () As KeyedHashAlgorithm

Gibt zurück

Eine neue HMACSHA1-Instanz, sofern die Standardeinstellungen nicht geändert wurden.

Attribute

Hinweise

Standardmäßig verwendet diese Überladung die HMACSHA1 Implementierung eines Schlüsselhashalgorithmus. Wenn Sie eine andere Implementierung angeben möchten, verwenden Sie die Überladung, mit der Create(String) Sie stattdessen einen Algorithmusnamen angeben können. Das Kryptografiekonfigurationssystem definiert die Standardimplementierung der KeyedHashAlgorithm Klasse.

Aufgrund von Problemen durch Konflikte mit SHA1 wird von Microsoft ein Sicherheitsmodell empfohlen, das mindestens auf SHA256 basiert.

Weitere Informationen

Gilt für:

Create(String)

Quelle:
KeyedHashAlgorithm.cs
Quelle:
KeyedHashAlgorithm.cs
Quelle:
KeyedHashAlgorithm.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 schlüsselgebundenen Hashalgorithmus.

public:
 static System::Security::Cryptography::KeyedHashAlgorithm ^ Create(System::String ^ algName);
public static System.Security.Cryptography.KeyedHashAlgorithm? Create (string algName);
[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.KeyedHashAlgorithm? Create (string algName);
public static System.Security.Cryptography.KeyedHashAlgorithm Create (string algName);
static member Create : string -> System.Security.Cryptography.KeyedHashAlgorithm
[<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.KeyedHashAlgorithm
Public Shared Function Create (algName As String) As KeyedHashAlgorithm

Parameter

algName
String

Die zu verwendende Implementierung eines schlüsselgebundenen Hashalgorithmus. Die folgende Tabelle zeigt die gültigen Werte für den algName-Parameter sowie die Algorithmen, denen sie zugeordnet sind.

Parameterwert die
System.Security.Cryptography.HMACHMACSHA1
System.Security.Cryptography.KeyedHashAlgorithmHMACSHA1
HMACMD5HMACMD5
System.Security.Cryptography.HMACMD5HMACMD5
HMACRIPEMD160HMACRIPEMD160
System.Security.Cryptography.HMACRIPEMD160HMACRIPEMD160
HMACSHA1HMACSHA1
System.Security.Cryptography.HMACSHA1HMACSHA1
HMACSHA256HMACSHA256
System.Security.Cryptography.HMACSHA256HMACSHA256
HMACSHA384HMACSHA384
System.Security.Cryptography.HMACSHA384HMACSHA384
HMACSHA512HMACSHA512
System.Security.Cryptography.HMACSHA512HMACSHA512
MACTripleDESMACTripleDES
System.Security.Cryptography.MACTripleDESMACTripleDES

Gibt zurück

Eine neue Instanz des angegebenen schlüsselgebundenen Hashalgorithmus.

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.

Diese Methode unterstützt eine Reihe von Algorithmen, einschließlich MD5, SHA-1, SHA-256 und RIPEMD160. Eine vollständige Liste finden Sie in den unterstützten Werten für den algName Parameter.

Weitere Informationen

Gilt für: