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)

來源:
SP800108HmacCounterKdf.cs
來源:
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)

來源:
SP800108HmacCounterKdf.cs
來源:
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>)

來源:
SP800108HmacCounterKdf.cs
來源:
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)

來源:
SP800108HmacCounterKdf.cs
來源:
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>)

來源:
SP800108HmacCounterKdf.cs
來源:
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)

來源:
SP800108HmacCounterKdf.cs
來源:
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 編碼轉換成位元組。 對於其他編碼方式,請使用所需的編碼方式執行轉換,並使用多載來接受標籤和內容做為位元組序列。

適用於