语言

HKDF.Expand 方法

定义

执行 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[]

可选的上下文和应用程序特定信息。

返回

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>

至少只要指定哈希算法的输出字节数组(通常是提取步骤的输出)的伪随机键。

output
Span<Byte>

用于接收输出键处理材料的目标缓冲区。

info
ReadOnlySpan<Byte>

上下文和应用程序特定信息(可以是空范围)。

例外

output 为空,或大于允许的最大长度。

在 .NET 11 及更高版本中Windows,prk超过 2,048 字节。

适用于