KeyedHashAlgorithm.Create Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee maakt u een exemplaar van een implementatie van een sleutel-hash-algoritme.
Overloads
| Name | Description |
|---|---|
| Create() |
Verouderd.
Verouderd.
Hiermee maakt u een exemplaar van de standaard implementatie van een sleutel-hash-algoritme. |
| Create(String) |
Verouderd.
Hiermee maakt u een exemplaar van de opgegeven implementatie van een sleutel-hash-algoritme. |
Create()
Let op
The default implementation of this cryptography algorithm is not supported.
Let op
The default implementation of this cryptography algorithm is not supported
Hiermee maakt u een exemplaar van de standaard implementatie van een sleutel-hash-algoritme.
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
Retouren
Een nieuw HMACSHA1 exemplaar, tenzij de standaardinstellingen zijn gewijzigd.
- Kenmerken
Opmerkingen
Deze overbelasting maakt standaard gebruik van de HMACSHA1 implementatie van een sleutel-hash-algoritme. Als u een andere implementatie wilt opgeven, gebruikt u de Create(String) overbelasting, waarmee u in plaats daarvan een algoritmenaam kunt opgeven. Het cryptografieconfiguratiesysteem definieert de standaard implementatie van de KeyedHashAlgorithm klasse.
Vanwege conflictproblemen met SHA-1 raadt Microsoft een beveiligingsmodel aan op basis van SHA-256 of beter.
Zie ook
Van toepassing op
Create(String)
Let op
Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.
Hiermee maakt u een exemplaar van de opgegeven implementatie van een sleutel-hash-algoritme.
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
Parameters
- algName
- String
De implementatie van het sleutel-hash-algoritme die moet worden gebruikt. In de volgende tabel ziet u de geldige waarden voor de algName parameter en de algoritmen waaraan ze zijn toegewezen.
| Parameterwaarde | Implementeert |
|---|---|
| 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 |
Retouren
Een nieuw exemplaar van het opgegeven sleutel-hash-algoritme.
- Kenmerken
Uitzonderingen
.NET Core 2.0 - 3.1 en .NET 5 en hoger: In alle gevallen.
Opmerkingen
Deze methode is verouderd in .NET 5 en latere versies.
Deze methode ondersteunt een aantal algoritmen, waaronder MD5, SHA-1, SHA-256 en RIPEMD160. Zie de ondersteunde waarden voor de algName parameter voor een volledige lijst.