KeyedHashAlgorithm.Create Metódus

Definíció

Egy kulcsos kivonatoló algoritmus implementációjának egy példányát hozza létre.

Túlterhelések

Name Description
Create()
Elavult.
Elavult.

Egy kulcsos kivonatoló algoritmus alapértelmezett implementációjának egy példányát hozza létre.

Create(String)
Elavult.

Egy kulcsos kivonatoló algoritmus megadott implementációjának egy példányát hozza létre.

Create()

Forrás:
KeyedHashAlgorithm.cs
Forrás:
KeyedHashAlgorithm.cs
Forrás:
KeyedHashAlgorithm.cs
Forrás:
KeyedHashAlgorithm.cs
Forrás:
KeyedHashAlgorithm.cs

Figyelemfelhívás

The default implementation of this cryptography algorithm is not supported.

Figyelemfelhívás

The default implementation of this cryptography algorithm is not supported

Egy kulcsos kivonatoló algoritmus alapértelmezett implementációjának egy példányát hozza létre.

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

Válaszok

Új HMACSHA1 példány, kivéve, ha az alapértelmezett beállítások módosultak.

Attribútumok

Megjegyzések

Alapértelmezés szerint ez a HMACSHA1 túlterhelés egy kulcsos kivonatoló algoritmus implementálását használja. Ha másik implementációt szeretne megadni, használja a Create(String) túlterhelést, amely lehetővé teszi egy algoritmus nevének megadását. A titkosítási konfigurációs rendszer határozza meg az osztály alapértelmezett implementációját KeyedHashAlgorithm .

Az SHA-1 ütközési problémái miatt a Microsoft az SHA-256-ra vagy annál jobbra épülő biztonsági modellt javasol.

Lásd még

A következőre érvényes:

Create(String)

Forrás:
KeyedHashAlgorithm.cs
Forrás:
KeyedHashAlgorithm.cs
Forrás:
KeyedHashAlgorithm.cs
Forrás:
KeyedHashAlgorithm.cs
Forrás:
KeyedHashAlgorithm.cs

Figyelemfelhívás

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

Egy kulcsos kivonatoló algoritmus megadott implementációjának egy példányát hozza létre.

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

Paraméterek

algName
String

A kulcsra épülő kivonatoló algoritmus implementációja. Az alábbi táblázat a paraméter érvényes értékeit algName és az általuk leképezésre használt algoritmusokat mutatja be.

Paraméter értéke Végrehajtja
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

Válaszok

A megadott kulcsos kivonatoló algoritmus új példánya.

Attribútumok

Kivételek

.NET Core 2.0 – 3.1 és .NET 5-ös és újabb verziók: Minden esetben.

Megjegyzések

Ez a módszer elavult .NET 5-ös és újabb verziókban.

Ez a módszer számos algoritmust támogat, beleértve az MD5, az SHA-1, az SHA-256 és a RIPEMD160. A teljes lista megtekintéséhez tekintse meg a paraméter támogatott értékeit algName .

Lásd még

A következőre érvényes: