Movatterモバイル変換


[0]ホーム

URL:


Skip to main contentSkip to in-page navigation

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit editor mode

SHA256.Create Method

Definition

Namespace:
System.Security.Cryptography
Assemblies:
netstandard.dll, System.Security.Cryptography.dll
Assemblies:
netstandard.dll, System.Security.Cryptography.Algorithms.dll
Assembly:
System.Security.Cryptography.Algorithms.dll
Assembly:
mscorlib.dll
Assembly:
netstandard.dll

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Allows specific implementations of this abstract class to be instantiated.

Overloads

NameDescription
Create()

Creates an instance of the default implementation ofSHA256.

Create(String)
Obsolete.

Creates an instance of a specified implementation ofSHA256.

Create()

Source:
SHA256.cs
Source:
SHA256.cs
Source:
SHA256.cs
Source:
SHA256.cs

Creates an instance of the default implementation ofSHA256.

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

Returns

A new instance ofSHA256. On the .NET Framework, this method creates an instance of theSHA256Managed class if FIPS mode is not active; if FIPS mode is active, it creates an instance of theSHA256Cng class. On .NET Core, it returns an instance of a private class derived fromSHA256.

Exceptions

On the .NET Framework 4.6.1 and earlier versions only: The algorithm was used with Federal Information Processing Standards (FIPS) mode enabled, but is not FIPS compatible.

See also

Applies to

Create(String)

Source:
SHA256.cs
Source:
SHA256.cs
Source:
SHA256.cs
Source:
SHA256.cs

Caution

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

Creates an instance of a specified implementation ofSHA256.

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

Parameters

hashName
String

The name of the specific implementation ofSHA256 to be used.

Returns

A new instance ofSHA256 using the specified implementation.

Attributes

Exceptions

On the .NET Framework only: FIPS mode is enabled, buthashName requestsSHA256Managed, which is not FIPS compatible.

Remarks

The .NET Framework includes the implementations and their associated hashName values:

ImplementationhashName
SHA256ManagedSHA256
SHA-256
System.Security.Cryptography.SHA256
SHA256CngSystem.Security.Cryptography.SHA256Cng
SHA256CryptoServiceProviderSystem.Security.Cryptography.SHA256CryptoServiceProvider

See also

Applies to

Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, seeour contributor guide.

Feedback

Was this page helpful?

YesNoNo

Need help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?

In this article

Was this page helpful?

YesNo
NoNeed help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?