語言

HKDF.Expand 方法

定義

執行 HKDF-Expand 功能。 詳見 RFC5869第2.3節。

多載

名稱 Description
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[])

來源:
HKDF.cs
來源:
HKDF.cs
來源:
HKDF.cs
來源:
HKDF.cs
來源:
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。

在 Windows 的 .NET 11 及以上版本中,prk記憶體超過 2,048 位元組。

適用於

Expand(HashAlgorithmName, ReadOnlySpan<Byte>, Span<Byte>, ReadOnlySpan<Byte>)

來源:
HKDF.cs
來源:
HKDF.cs
來源:
HKDF.cs
來源:
HKDF.cs
來源:
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 為空,或大於最大允許長度。

在 Windows 的 .NET 11 及以上版本中,prk記憶體超過 2,048 位元組。

適用於