HashAlgorithm.Create Methode

Definition

Erstellt eine Instanz einer Implementierung eines Hashalgorithmus.

Überlädt

Name Beschreibung
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
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, es sei denn, die Standardeinstellungen wurden mithilfe der .

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 die Create(String) Überladung, die es Ihnen ermöglicht, stattdessen einen Algorithmusnamen anzugeben. Das Kryptografiekonfigurationssystem definiert die Standardimplementierung von HashAlgorithm.

Aufgrund von Kollisionsproblemen mit SHA-1 empfiehlt Microsoft ein Sicherheitsmodell, das auf SHA-256 oder höher basiert.

Gilt für:

Create(String)

Quelle:
HashAlgorithm.cs
Quelle:
HashAlgorithm.cs
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);
[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.HashAlgorithm? Create(string hashName);
public static System.Security.Cryptography.HashAlgorithm? Create(string hashName);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
public static System.Security.Cryptography.HashAlgorithm? Create(string hashName);
public static System.Security.Cryptography.HashAlgorithm Create(string hashName);
[<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.HashAlgorithm
static member Create : string -> System.Security.Cryptography.HashAlgorithm
[<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.HashAlgorithm
Public Shared Function Create (hashName As String) As HashAlgorithm

Parameter

hashName
String

Die zu verwendende Hashalgorithmusimplementierung. In der folgenden Tabelle sind die gültigen Werte für den hashName Parameter und die Algorithmen aufgeführt, zu der sie zugeordnet sind.

Parameterwert Implementiert
SHA SHA1CryptoServiceProvider
SHA1 SHA1CryptoServiceProvider
System.Security.Cryptography.SHA1 SHA1CryptoServiceProvider
System.Security.Cryptography.HashAlgorithm SHA1CryptoServiceProvider
MD5 MD5CryptoServiceProvider
System.Security.Cryptography.MD5 MD5CryptoServiceProvider
SHA256 SHA256Managed
SHA-256 SHA256Managed
System.Security.Cryptography.SHA256 SHA256Managed
SHA384 SHA384Managed
SHA-384 SHA384Managed
System.Security.Cryptography.SHA384 SHA384Managed
SHA512 SHA512Managed
SHA-512 SHA512Managed
System.Security.Cryptography.SHA512 SHA512Managed

Gibt zurück

Eine neue Instanz des angegebenen Hashalgorithmus oder null wenn hashName es sich nicht um einen gültigen Hashalgorithmus handelt.

Attribute

Gilt für: