HMAC.Create Yöntem

Tanım

Karma Tabanlı İleti Kimlik Doğrulama Kodu (HMAC) uygulamasının bir örneğini oluşturur.

Aşırı Yüklemeler

Name Description
Create()
Geçersiz.
Geçersiz.

Karma Tabanlı İleti Kimlik Doğrulama Kodunun (HMAC) varsayılan uygulamasının bir örneğini oluşturur.

Create(String)
Geçersiz.

Karma Tabanlı İleti Kimlik Doğrulama Kodunun (HMAC) belirtilen uygulamasının bir örneğini oluşturur.

Create()

Kaynak:
HMAC.cs
Kaynak:
HMAC.cs
Kaynak:
HMAC.cs
Kaynak:
HMAC.cs
Kaynak:
HMAC.cs

Dikkat

The default implementation of this cryptography algorithm is not supported.

Dikkat

The default implementation of this cryptography algorithm is not supported

Karma Tabanlı İleti Kimlik Doğrulama Kodunun (HMAC) varsayılan uygulamasının bir örneğini oluşturur.

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

Döndürülenler

CryptoClass< öğesi kullanılarak> varsayılan ayarlar değiştirilmediği sürece yeni bir SHA-1 örneği.

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

Varsayılan olarak, bu aşırı yükleme HMAC'nin SHA-1 uygulamasını kullanır. Farklı bir uygulama belirtmek istiyorsanız, bunun yerine bir algoritma adı belirtmenize olanak tanıyan aşırı yüklemeyi kullanın Create(String) .

SHA-1 ile ilgili çakışma sorunları nedeniyle Microsoft, SHA-256 veya üzerini temel alan bir güvenlik modeli önerir.

Şunlara uygulanır

Create(String)

Kaynak:
HMAC.cs
Kaynak:
HMAC.cs
Kaynak:
HMAC.cs
Kaynak:
HMAC.cs
Kaynak:
HMAC.cs

Dikkat

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

Karma Tabanlı İleti Kimlik Doğrulama Kodunun (HMAC) belirtilen uygulamasının bir örneğini oluşturur.

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

Parametreler

algorithmName
String

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

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

Belirtilen HMAC uygulamasının yeni bir örneği.

Öznitelikler

Açıklamalar

HMAC, MD5, SHA-1, SHA-256 ve RIPEMD160 gibi çeşitli karma algoritmaları destekler. Tam liste için parametresi için desteklenen değerlere algorithmName bakın.

MD5 ve SHA-1 ile ilgili çakışma sorunları nedeniyle Microsoft, SHA-256 veya üzerini temel alan bir güvenlik modeli önerir.

Şunlara uygulanır