IncrementalHash.CreateHMAC メソッド

定義

オーバーロード

名前 説明
CreateHMAC(HashAlgorithmName, Byte[])

IncrementalHashで指定されたハッシュ アルゴリズムと、hashAlgorithmで指定されたキーを使用して、ハッシュ ベースのメッセージ認証コード (HMAC) アルゴリズムのkeyを作成します。

CreateHMAC(HashAlgorithmName, ReadOnlySpan<Byte>)

IncrementalHashで指定されたハッシュ アルゴリズムと、hashAlgorithmで指定されたキーを使用して、ハッシュ ベースのメッセージ認証コード (HMAC) アルゴリズムのkeyを作成します。

CreateHMAC(HashAlgorithmName, Byte[])

ソース:
IncrementalHash.cs
ソース:
IncrementalHash.cs
ソース:
IncrementalHash.cs
ソース:
IncrementalHash.cs
ソース:
IncrementalHash.cs

IncrementalHashで指定されたハッシュ アルゴリズムと、hashAlgorithmで指定されたキーを使用して、ハッシュ ベースのメッセージ認証コード (HMAC) アルゴリズムのkeyを作成します。

public:
 static System::Security::Cryptography::IncrementalHash ^ CreateHMAC(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, cli::array <System::Byte> ^ key);
public static System.Security.Cryptography.IncrementalHash CreateHMAC(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] key);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.IncrementalHash CreateHMAC(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] key);
static member CreateHMAC : System.Security.Cryptography.HashAlgorithmName * byte[] -> System.Security.Cryptography.IncrementalHash
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member CreateHMAC : System.Security.Cryptography.HashAlgorithmName * byte[] -> System.Security.Cryptography.IncrementalHash
Public Shared Function CreateHMAC (hashAlgorithm As HashAlgorithmName, key As Byte()) As IncrementalHash

パラメーター

hashAlgorithm
HashAlgorithmName

HMAC 内で実行するハッシュ アルゴリズムの名前。

key
Byte[]

HMAC の秘密鍵。 キーは任意の長さにできますが、 hashAlgorithm で指定されたハッシュ アルゴリズムの出力サイズより長いキーは、( hashAlgorithm で指定されたアルゴリズムを使用して) ハッシュされ、正しいサイズのキーが派生します。 そのため、秘密キーの推奨サイズは、 hashAlgorithmで指定されたハッシュの出力サイズです。

返品

IncrementalHashで指定されたハッシュ アルゴリズムを計算する準備ができているhashAlgorithm インスタンス。

属性

例外

keynullです。

hashAlgorithm.Namenull、または空の文字列です。

hashAlgorithm は既知のハッシュ アルゴリズムではありません。

適用対象

CreateHMAC(HashAlgorithmName, ReadOnlySpan<Byte>)

ソース:
IncrementalHash.cs
ソース:
IncrementalHash.cs
ソース:
IncrementalHash.cs
ソース:
IncrementalHash.cs
ソース:
IncrementalHash.cs

IncrementalHashで指定されたハッシュ アルゴリズムと、hashAlgorithmで指定されたキーを使用して、ハッシュ ベースのメッセージ認証コード (HMAC) アルゴリズムのkeyを作成します。

public:
 static System::Security::Cryptography::IncrementalHash ^ CreateHMAC(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<System::Byte> key);
public static System.Security.Cryptography.IncrementalHash CreateHMAC(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.IncrementalHash CreateHMAC(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key);
static member CreateHMAC : System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> -> System.Security.Cryptography.IncrementalHash
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member CreateHMAC : System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> -> System.Security.Cryptography.IncrementalHash
Public Shared Function CreateHMAC (hashAlgorithm As HashAlgorithmName, key As ReadOnlySpan(Of Byte)) As IncrementalHash

パラメーター

hashAlgorithm
HashAlgorithmName

HMAC 内で実行するハッシュ アルゴリズムの名前。

key
ReadOnlySpan<Byte>

HMAC の秘密鍵。

返品

hashAlgorithmで指定されたハッシュ アルゴリズムを計算するハッシュ インスタンス。

属性

例外

hashAlgorithm.Namenull または空の文字列です。

hashAlgorithm は既知のハッシュ アルゴリズムではありません。

適用対象