语言

HKDF.Extract 方法

定义

执行 HKDF-Extract 函数。 请参阅 RFC5869第 2.2 节。

重载

名称 说明
Extract(HashAlgorithmName, Byte[], Byte[])

执行 HKDF-Extract 函数。 请参阅 RFC5869第 2.2 节。

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

执行 HKDF-Extract 函数。 请参阅 RFC5869第 2.2 节。

Extract(HashAlgorithmName, Byte[], Byte[])

Source:
HKDF.cs
Source:
HKDF.cs
Source:
HKDF.cs
Source:
HKDF.cs
Source:
HKDF.cs

执行 HKDF-Extract 函数。 请参阅 RFC5869第 2.2 节。

public static byte[] Extract(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, byte[] ikm, byte[]? salt = default);
static member Extract : System.Security.Cryptography.HashAlgorithmName * byte[] * byte[] -> byte[]
Public Shared Function Extract (hashAlgorithmName As HashAlgorithmName, ikm As Byte(), Optional salt As Byte() = Nothing) As Byte()

参数

hashAlgorithmName
HashAlgorithmName

用于 HMAC 操作的哈希算法。

ikm
Byte[]

输入键键材料。

salt
Byte[]

可选的盐值(非机密随机值)。 如果未提供,则默认为长度与指定哈希算法的输出相同的字节数组。

返回

Byte[]

伪随机键(prk)。

适用于

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

Source:
HKDF.cs
Source:
HKDF.cs
Source:
HKDF.cs
Source:
HKDF.cs
Source:
HKDF.cs

执行 HKDF-Extract 函数。 请参阅 RFC5869第 2.2 节。

public:
 static int Extract(System::Security::Cryptography::HashAlgorithmName hashAlgorithmName, ReadOnlySpan<System::Byte> ikm, ReadOnlySpan<System::Byte> salt, Span<System::Byte> prk);
public static int Extract(System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, ReadOnlySpan<byte> ikm, ReadOnlySpan<byte> salt, Span<byte> prk);
static member Extract : System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> * ReadOnlySpan<byte> * Span<byte> -> int
Public Shared Function Extract (hashAlgorithmName As HashAlgorithmName, ikm As ReadOnlySpan(Of Byte), salt As ReadOnlySpan(Of Byte), prk As Span(Of Byte)) As Integer

参数

hashAlgorithmName
HashAlgorithmName

用于 HMAC 操作的哈希算法。

ikm
ReadOnlySpan<Byte>

输入键键材料。

salt
ReadOnlySpan<Byte>

盐值(非机密随机值)。

prk
Span<Byte>

要接收伪随机密钥的目标缓冲区(prk)。

返回

写入缓冲区的 prk 字节数。

适用于