IncrementalHash.CreateHMAC 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
CreateHMAC(HashAlgorithmName, Byte[]) |
使用 |
CreateHMAC(HashAlgorithmName, ReadOnlySpan<Byte>) |
使用 |
CreateHMAC(HashAlgorithmName, Byte[])
- Source:
- IncrementalHash.cs
- Source:
- IncrementalHash.cs
- Source:
- IncrementalHash.cs
使用 hashAlgorithm
指定的哈希算法和由 key
指定的密钥,为基于哈希的消息身份验证代码(HMAC)算法创建 IncrementalHash。
public:
static System::Security::Cryptography::IncrementalHash ^ CreateHMAC(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, cli::array <System::Byte> ^ key);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.IncrementalHash CreateHMAC (System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] key);
public static System.Security.Cryptography.IncrementalHash CreateHMAC (System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] key);
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member CreateHMAC : System.Security.Cryptography.HashAlgorithmName * byte[] -> System.Security.Cryptography.IncrementalHash
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 的密钥。
返回
IncrementalHash 实例已准备好计算由 hashAlgorithm
指定的哈希算法。
- 属性
例外
key
null
。
hashAlgorithm
。Name 为 null
或空字符串。
hashAlgorithm
不是已知的哈希算法。
适用于
CreateHMAC(HashAlgorithmName, ReadOnlySpan<Byte>)
- Source:
- IncrementalHash.cs
- Source:
- IncrementalHash.cs
- Source:
- IncrementalHash.cs
使用 hashAlgorithm
指定的哈希算法和由 key
指定的密钥,为基于哈希的消息身份验证代码(HMAC)算法创建 IncrementalHash。
public:
static System::Security::Cryptography::IncrementalHash ^ CreateHMAC(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<System::Byte> key);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.IncrementalHash CreateHMAC (System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key);
public static System.Security.Cryptography.IncrementalHash CreateHMAC (System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key);
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member CreateHMAC : System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> -> System.Security.Cryptography.IncrementalHash
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
不是已知的哈希算法。