HashAlgorithm.Create Yöntem

Tanım

Karma algoritması uygulamasının bir örneğini oluşturur.

Aşırı Yüklemeler

Create()
Geçersiz.
Geçersiz.

Karma algoritmasının varsayılan uygulamasının bir örneğini oluşturur.

Create(String)
Geçersiz.

Bir karma algoritmasının belirtilen uygulamasının bir örneğini oluşturur.

Create()

Kaynak:
HashAlgorithm.cs
Kaynak:
HashAlgorithm.cs
Kaynak:
HashAlgorithm.cs

Dikkat

The default implementation of this cryptography algorithm is not supported

Dikkat

The default implementation of this cryptography algorithm is not supported.

Karma algoritmasının varsayılan uygulamasının bir örneğini oluşturur.

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

Döndürülenler

Varsayılan ayarlar kullanılarak değiştirilmediği sürece yeni SHA1CryptoServiceProvider bir örnek.

Öznitelikler

Özel durumlar

.NET Core 2.0 - 3.1 ve .NET 5 ve üzeri: Her durumda.

Açıklamalar

Bu yöntem .NET 5 ve sonraki sürümlerde kullanımdan kaldırıldı.

Varsayılan olarak, bu aşırı yükleme karma algoritmasının uygulanmasını kullanır SHA1CryptoServiceProvider . Farklı bir uygulama belirtmek istiyorsanız, bunun yerine bir algoritma adı belirtmenize olanak tanıyan aşırı yüklemeyi kullanın Create(String) . Şifreleme yapılandırma sistemi varsayılan uygulamasını HashAlgorithmtanımlar.

SHA1 ile ilgili çakışma sorunları nedeniyle Microsoft SHA256 veya üzerini temel alan bir güvenlik modeli önerir.

Şunlara uygulanır

Create(String)

Kaynak:
HashAlgorithm.cs
Kaynak:
HashAlgorithm.cs
Kaynak:
HashAlgorithm.cs

Dikkat

Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.

Bir karma algoritmasının belirtilen uygulamasının bir örneğini oluşturur.

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

Parametreler

hashName
String

Kullanılacak karma algoritma uygulaması. Aşağıdaki tabloda parametrenin hashName geçerli değerleri ve eşledikleri algoritmalar gösterilmektedir.

Parametre değeri Uygulamalar
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

Döndürülenler

Belirtilen karma algoritmasının yeni bir örneği veya null geçerli bir karma algoritması değilse hashName .

Öznitelikler

Şunlara uygulanır