KeyedHashAlgorithm.Create Yöntem

Tanım

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

Aşırı Yüklemeler

Create()
Kullanımdan kalktı.
Kullanımdan kalktı.

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

Create(String)

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

Create()

Dikkat

The default implementation of this cryptography algorithm is not supported

Dikkat

The default implementation of this cryptography algorithm is not supported.

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

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

Döndürülenler

KeyedHashAlgorithm

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

Öznitelikler

Açıklamalar

Varsayılan olarak, bu aşırı yükleme anahtarlı karma algoritmasının uygulanmasını kullanır HMACSHA1 . 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, sınıfın varsayılan uygulamasını KeyedHashAlgorithm tanımlar.

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

Ayrıca bkz.

Şunlara uygulanır

Create(String)

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

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

Parametreler

algName
String

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

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

Döndürülenler

KeyedHashAlgorithm

Belirtilen anahtarlı karma algoritmasının yeni bir örneği.

Ö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ı.

Bu yöntem MD5, SHA-1, SHA-256 ve RIPEMD160 gibi bir dizi algoritmayı destekler. Tam liste için parametresi için desteklenen değerlere algName bakın.

Ayrıca bkz.

Şunlara uygulanır