SHA256.Create Метод

Определение

Позволяет создавать экземпляры конкретных реализаций этого абстрактного класса.

Перегрузки

Имя Описание
Create()

Создает экземпляр реализации SHA256по умолчанию.

Create(String)
Устаревшие.

Создает экземпляр указанной реализации SHA256.

Create()

Исходный код:
SHA256.cs
Исходный код:
SHA256.cs
Исходный код:
SHA256.cs
Исходный код:
SHA256.cs
Исходный код:
SHA256.cs

Создает экземпляр реализации SHA256по умолчанию.

public:
 static System::Security::Cryptography::SHA256 ^ Create();
public static System.Security.Cryptography.SHA256 Create();
static member Create : unit -> System.Security.Cryptography.SHA256
Public Shared Function Create () As SHA256

Возвращаемое значение

Новый экземпляр SHA256. В .NET Framework этот метод создает экземпляр класса SHA256Managed, если режим FIPS не активен; если режим FIPS активен, он создает экземпляр класса SHA256Cng. В .NET Core возвращается экземпляр частного класса, производный от SHA256.

Исключения

Только в .NET Framework 4.6.1 и более ранних версиях: алгоритм использовался с включенным режимом федеральных стандартов обработки информации (FIPS), но не совместим с FIPS.

См. также раздел

Применяется к

Create(String)

Исходный код:
SHA256.cs
Исходный код:
SHA256.cs
Исходный код:
SHA256.cs
Исходный код:
SHA256.cs
Исходный код:
SHA256.cs

Внимание!

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

Создает экземпляр указанной реализации SHA256.

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

Параметры

hashName
String

Имя используемой реализации SHA256 .

Возвращаемое значение

Новый экземпляр использования указанной SHA256 реализации.

Атрибуты

Исключения

Только в .NET Framework включен режим FIPS, но hashName запросы SHA256Managed, несовместимые с FIPS.

Комментарии

Платформа .NET включает реализации и связанные значения hashName:

Implementation hashName
SHA256Managed SHA256
SHA-256
System.Security.Cryptography.SHA256
SHA256Cng System.Security.Cryptography.SHA256Cng
SHA256CryptoServiceProvider System.Security.Cryptography.SHA256CryptoServiceProvider

См. также раздел

Применяется к