HKDF.Expand 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
执行 HKDF-Expand 函数。 请参阅 RFC5869第 2.3 节。
重载
| 名称 | 说明 |
|---|---|
| Expand(HashAlgorithmName, Byte[], Int32, Byte[]) |
执行 HKDF-Expand 函数,请参阅 RFC5869的第 2.3 节。 |
| Expand(HashAlgorithmName, ReadOnlySpan<Byte>, Span<Byte>, ReadOnlySpan<Byte>) |
执行 HKDF-Expand 函数。 请参阅 RFC5869第 2.3 节。 |
Expand(HashAlgorithmName, Byte[], Int32, Byte[])
- Source:
- HKDF.cs
- Source:
- HKDF.cs
- Source:
- HKDF.cs
- Source:
- HKDF.cs
- Source:
- HKDF.cs
执行 HKDF-Expand 函数,请参阅 RFC5869的第 2.3 节。
public static byte[] Expand(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, byte[] prk, int outputLength, byte[]? info = default);
static member Expand : System.Security.Cryptography.HashAlgorithmName * byte[] * int * byte[] -> byte[]
Public Shared Function Expand (hashAlgorithmName As HashAlgorithmName, prk As Byte(), outputLength As Integer, Optional info As Byte() = Nothing) As Byte()
参数
- hashAlgorithmName
- HashAlgorithmName
用于 HMAC 操作的哈希算法。
- prk
- Byte[]
至少是指定哈希算法的输出字节数组(通常是提取步骤的输出)的伪随机键。
- outputLength
- Int32
输出键键材料长度。
- info
- Byte[]
可选的上下文和应用程序特定信息。
返回
输出键键材料。
例外
prk是 null.
outputLength 小于 1。
在 .NET 11 及更高版本中Windows,prk超过 2,048 字节。
适用于
Expand(HashAlgorithmName, ReadOnlySpan<Byte>, Span<Byte>, ReadOnlySpan<Byte>)
- Source:
- HKDF.cs
- Source:
- HKDF.cs
- Source:
- HKDF.cs
- Source:
- HKDF.cs
- Source:
- HKDF.cs
执行 HKDF-Expand 函数。 请参阅 RFC5869第 2.3 节。
public:
static void Expand(System::Security::Cryptography::HashAlgorithmName hashAlgorithmName, ReadOnlySpan<System::Byte> prk, Span<System::Byte> output, ReadOnlySpan<System::Byte> info);
public static void Expand(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, ReadOnlySpan<byte> prk, Span<byte> output, ReadOnlySpan<byte> info);
static member Expand : System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> * Span<byte> * ReadOnlySpan<byte> -> unit
Public Shared Sub Expand (hashAlgorithmName As HashAlgorithmName, prk As ReadOnlySpan(Of Byte), output As Span(Of Byte), info As ReadOnlySpan(Of Byte))
参数
- hashAlgorithmName
- HashAlgorithmName
用于 HMAC 操作的哈希算法。
- prk
- ReadOnlySpan<Byte>
至少只要指定哈希算法的输出字节数组(通常是提取步骤的输出)的伪随机键。
- info
- ReadOnlySpan<Byte>
上下文和应用程序特定信息(可以是空范围)。
例外
output 为空,或大于允许的最大长度。
在 .NET 11 及更高版本中Windows,prk超过 2,048 字节。