KeyedHashAlgorithm.Create メソッド

定義

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

オーバーロード

Create()
互換性のために残されています。
互換性のために残されています。

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

Create(String)

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

Create()

注意事項

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

戻り値

KeyedHashAlgorithm

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

属性

注釈

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

SHA1 との競合問題のため、Microsoft では SHA256 以上に基づくセキュリティ モデルを推奨しています。

こちらもご覧ください

適用対象

Create(String)

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

public:
 static System::Security::Cryptography::KeyedHashAlgorithm ^ Create(System::String ^ algName);
public static System.Security.Cryptography.KeyedHashAlgorithm? Create (string algName);
public static System.Security.Cryptography.KeyedHashAlgorithm Create (string algName);
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

戻り値

KeyedHashAlgorithm

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

例外

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

注釈

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

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

こちらもご覧ください

適用対象