KeyedHashAlgorithm.Create メソッド

定義

キー付きハッシュ アルゴリズムの実装のインスタンスを作成します。

オーバーロード

名前 説明
Create()
古い.
古い.

キー付きハッシュ アルゴリズムの既定の実装のインスタンスを作成します。

Create(String)
古い.

キー付きハッシュ アルゴリズムの指定された実装のインスタンスを作成します。

Create()

ソース:
KeyedHashAlgorithm.cs
ソース:
KeyedHashAlgorithm.cs
ソース:
KeyedHashAlgorithm.cs
ソース:
KeyedHashAlgorithm.cs
ソース:
KeyedHashAlgorithm.cs

注意事項

The default implementation of this cryptography algorithm is not supported.

注意事項

The default implementation of this cryptography algorithm is not supported

キー付きハッシュ アルゴリズムの既定の実装のインスタンスを作成します。

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

返品

既定の設定が変更されていない限り、新しい HMACSHA1 インスタンス。

属性

注釈

既定では、このオーバーロードはキー付きハッシュ アルゴリズムの HMACSHA1 実装を使用します。 別の実装を指定する場合は、 Create(String) オーバーロードを使用します。これにより、代わりにアルゴリズム名を指定できます。 暗号化構成システムは、 KeyedHashAlgorithm クラスの既定の実装を定義します。

SHA-1 の競合の問題により、Microsoft では SHA-256 以上に基づくセキュリティ モデルをお勧めします。

こちらもご覧ください

適用対象

Create(String)

ソース:
KeyedHashAlgorithm.cs
ソース:
KeyedHashAlgorithm.cs
ソース:
KeyedHashAlgorithm.cs
ソース:
KeyedHashAlgorithm.cs
ソース:
KeyedHashAlgorithm.cs

注意事項

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

キー付きハッシュ アルゴリズムの指定された実装のインスタンスを作成します。

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

パラメーター

algName
String

使用するキー付きハッシュ アルゴリズムの実装。 次の表に、 algName パラメーターの有効な値と、それらがマップされるアルゴリズムを示します。

パラメーター値 用具
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

返品

指定したキー付きハッシュ アルゴリズムの新しいインスタンス。

属性

例外

.NET Core 2.0 - 3.1 および .NET 5 以降: すべての場合。

注釈

このメソッドは、.NET 5 以降のバージョンでは使用されていません。

このメソッドでは、MD5、SHA-1、SHA-256、RIPEMD160など、さまざまなアルゴリズムがサポートされています。 完全な一覧については、 algName パラメーターでサポートされている値を参照してください。

こちらもご覧ください

適用対象