语言

HKDF 类

定义

RFC5869基于 HMAC 的提取和扩展密钥派生 (HKF)

public ref class HKDF abstract sealed
public static class HKDF
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static class HKDF
type HKDF = class
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
type HKDF = class
Public Class HKDF
继承
HKDF
特性

注解

如果输入键材料已是统一随机位字符串,则 HKF 标准允许跳过提取阶段,并且主密钥将直接用作伪随机键。 有关详细信息 ,请参阅RFC5869 。

在 Windows .NET 11 及更高版本中,如果输入键击材料超过 2,048 字节,DeriveKey则CryptographicException引发。 Expand 如果伪随机键超过 2,048 字节,则引发相同的异常。

方法

名称 说明
DeriveKey(HashAlgorithmName, Byte[], Int32, Byte[], Byte[])

执行密钥派生 HKF Expand 和 Extract 函数。

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

执行密钥派生 HKF Expand 和 Extract 函数。

Expand(HashAlgorithmName, Byte[], Int32, Byte[])

执行 HKDF-Expand 函数,请参阅 RFC5869的第 2.3 节。

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

执行 HKDF-Expand 函数。 请参阅 RFC5869第 2.3 节。

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

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

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

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

适用于