SP800108HmacCounterKdf.DeriveKey 方法

定义

重载

DeriveKey(Byte[], Byte[], Int32)

派生指定长度的键。

DeriveKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32)

派生指定长度的键。

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

使用派生键填充缓冲区。

DeriveKey(ReadOnlySpan<Char>, ReadOnlySpan<Char>, Int32)

派生指定长度的键。

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

使用派生键填充缓冲区。

DeriveKey(String, String, Int32)

派生指定长度的键。

DeriveKey(Byte[], Byte[], Int32)

Source:
SP800108HmacCounterKdf.cs
Source:
SP800108HmacCounterKdf.cs

派生指定长度的键。

public:
 cli::array <System::Byte> ^ DeriveKey(cli::array <System::Byte> ^ label, cli::array <System::Byte> ^ context, int derivedKeyLengthInBytes);
public byte[] DeriveKey (byte[] label, byte[] context, int derivedKeyLengthInBytes);
member this.DeriveKey : byte[] * byte[] * int -> byte[]
Public Function DeriveKey (label As Byte(), context As Byte(), derivedKeyLengthInBytes As Integer) As Byte()

参数

label
Byte[]

标识派生密钥用途的标签。

context
Byte[]

包含与派生密钥相关的信息的上下文。

derivedKeyLengthInBytes
Int32

派生密钥的长度(以字节为单位)。

返回

Byte[]

包含派生键的数组。

例外

labelnull

contextnull

derivedKeyLengthInBytes 为负数或大于可派生的最大字节数。

适用于

DeriveKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32)

Source:
SP800108HmacCounterKdf.cs
Source:
SP800108HmacCounterKdf.cs

派生指定长度的键。

public:
 cli::array <System::Byte> ^ DeriveKey(ReadOnlySpan<System::Byte> label, ReadOnlySpan<System::Byte> context, int derivedKeyLengthInBytes);
public byte[] DeriveKey (ReadOnlySpan<byte> label, ReadOnlySpan<byte> context, int derivedKeyLengthInBytes);
member this.DeriveKey : ReadOnlySpan<byte> * ReadOnlySpan<byte> * int -> byte[]
Public Function DeriveKey (label As ReadOnlySpan(Of Byte), context As ReadOnlySpan(Of Byte), derivedKeyLengthInBytes As Integer) As Byte()

参数

label
ReadOnlySpan<Byte>

标识派生密钥用途的标签。

context
ReadOnlySpan<Byte>

包含与派生密钥相关的信息的上下文。

derivedKeyLengthInBytes
Int32

派生密钥的长度(以字节为单位)。

返回

Byte[]

包含派生键的数组。

例外

derivedKeyLengthInBytes 为负数或大于可派生的最大字节数。

适用于

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

Source:
SP800108HmacCounterKdf.cs
Source:
SP800108HmacCounterKdf.cs

使用派生键填充缓冲区。

public:
 void DeriveKey(ReadOnlySpan<System::Byte> label, ReadOnlySpan<System::Byte> context, Span<System::Byte> destination);
public void DeriveKey (ReadOnlySpan<byte> label, ReadOnlySpan<byte> context, Span<byte> destination);
member this.DeriveKey : ReadOnlySpan<byte> * ReadOnlySpan<byte> * Span<byte> -> unit
Public Sub DeriveKey (label As ReadOnlySpan(Of Byte), context As ReadOnlySpan(Of Byte), destination As Span(Of Byte))

参数

label
ReadOnlySpan<Byte>

标识派生密钥用途的标签。

context
ReadOnlySpan<Byte>

包含与派生密钥相关的信息的上下文。

destination
Span<Byte>

将接收派生密钥的缓冲区。

例外

labelnull

contextnull

destination 大于可派生的最大字节数。

适用于

DeriveKey(ReadOnlySpan<Char>, ReadOnlySpan<Char>, Int32)

Source:
SP800108HmacCounterKdf.cs
Source:
SP800108HmacCounterKdf.cs

派生指定长度的键。

public:
 cli::array <System::Byte> ^ DeriveKey(ReadOnlySpan<char> label, ReadOnlySpan<char> context, int derivedKeyLengthInBytes);
public byte[] DeriveKey (ReadOnlySpan<char> label, ReadOnlySpan<char> context, int derivedKeyLengthInBytes);
member this.DeriveKey : ReadOnlySpan<char> * ReadOnlySpan<char> * int -> byte[]
Public Function DeriveKey (label As ReadOnlySpan(Of Char), context As ReadOnlySpan(Of Char), derivedKeyLengthInBytes As Integer) As Byte()

参数

label
ReadOnlySpan<Char>

标识派生密钥用途的标签。

context
ReadOnlySpan<Char>

包含与派生密钥相关的信息的上下文。

derivedKeyLengthInBytes
Int32

派生密钥的长度(以字节为单位)。

返回

Byte[]

包含派生键的数组。

例外

derivedKeyLengthInBytes 为负数或大于可派生的最大字节数。

labelcontext 包含无法转换为 UTF-8 的文本。

注解

labelcontext 将使用 UTF-8 编码转换为字节。 对于其他编码,请使用所需的编码执行转换,并使用接受标签和上下文作为字节序列的重载。

适用于

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

Source:
SP800108HmacCounterKdf.cs
Source:
SP800108HmacCounterKdf.cs

使用派生键填充缓冲区。

public:
 void DeriveKey(ReadOnlySpan<char> label, ReadOnlySpan<char> context, Span<System::Byte> destination);
public void DeriveKey (ReadOnlySpan<char> label, ReadOnlySpan<char> context, Span<byte> destination);
member this.DeriveKey : ReadOnlySpan<char> * ReadOnlySpan<char> * Span<byte> -> unit
Public Sub DeriveKey (label As ReadOnlySpan(Of Char), context As ReadOnlySpan(Of Char), destination As Span(Of Byte))

参数

label
ReadOnlySpan<Char>

标识派生密钥用途的标签。

context
ReadOnlySpan<Char>

包含与派生密钥相关的信息的上下文。

destination
Span<Byte>

将接收派生密钥的缓冲区。

例外

destination 大于可派生的最大字节数。

labelcontext 包含无法转换为 UTF-8 的文本。

注解

labelcontext 将使用 UTF-8 编码转换为字节。 对于其他编码,请使用所需的编码执行转换,并使用接受标签和上下文作为字节序列的重载。

适用于

DeriveKey(String, String, Int32)

Source:
SP800108HmacCounterKdf.cs
Source:
SP800108HmacCounterKdf.cs

派生指定长度的键。

public:
 cli::array <System::Byte> ^ DeriveKey(System::String ^ label, System::String ^ context, int derivedKeyLengthInBytes);
public byte[] DeriveKey (string label, string context, int derivedKeyLengthInBytes);
member this.DeriveKey : string * string * int -> byte[]
Public Function DeriveKey (label As String, context As String, derivedKeyLengthInBytes As Integer) As Byte()

参数

label
String

标识派生密钥用途的标签。

context
String

包含与派生密钥相关的信息的上下文。

derivedKeyLengthInBytes
Int32

派生密钥的长度(以字节为单位)。

返回

Byte[]

包含派生键的数组。

例外

labelnull

contextnull

derivedKeyLengthInBytes 为负数或大于可派生的最大字节数。

labelcontext 包含无法转换为 UTF-8 的文本。

注解

labelcontext 将使用 UTF-8 编码转换为字节。 对于其他编码,请使用所需的编码执行转换,并使用接受标签和上下文作为字节序列的重载。

适用于