HashAlgorithm.Create Methode

Definition

Erstellt eine Instanz der Implementierung eines Hashalgorithmus.

Überlädt

Create()
Veraltet.
Veraltet.

Erstellt eine Instanz der Standardimplementierung eines Hashalgorithmus.

Create(String)
Veraltet.

Erstellt eine Instanz der angegebenen Implementierung eines Hashalgorithmus.

Create()

Quelle:
HashAlgorithm.cs
Quelle:
HashAlgorithm.cs
Quelle:
HashAlgorithm.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 Hashalgorithmus.

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

Gibt zurück

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

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 SHA1CryptoServiceProvider Implementierung eines Hashalgorithmus. Wenn Sie eine andere Implementierung angeben möchten, verwenden Sie stattdessen die Create(String) Überladung, mit der Sie einen Algorithmusnamen angeben können. Das Kryptografiekonfigurationssystem definiert die Standardimplementierung von HashAlgorithm.

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

Gilt für:

Create(String)

Quelle:
HashAlgorithm.cs
Quelle:
HashAlgorithm.cs
Quelle:
HashAlgorithm.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 Hashalgorithmus.

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

Parameter

hashName
String

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

Parameterwert die
SHASHA1CryptoServiceProvider
SHA1SHA1CryptoServiceProvider
System.Security.Cryptography.SHA1SHA1CryptoServiceProvider
System.Security.Cryptography.HashAlgorithmSHA1CryptoServiceProvider
MD5MD5CryptoServiceProvider
System.Security.Cryptography.MD5MD5CryptoServiceProvider
SHA256SHA256Managed
SHA-256SHA256Managed
System.Security.Cryptography.SHA256SHA256Managed
SHA384SHA384Managed
SHA-384SHA384Managed
System.Security.Cryptography.SHA384SHA384Managed
SHA512SHA512Managed
SHA-512SHA512Managed
System.Security.Cryptography.SHA512SHA512Managed

Gibt zurück

Eine neue Instanz des angegebenen Hashalgorithmus oder null, wenn hashName kein gültiger Hashalgorithmus ist.

Attribute

Gilt für: