SP800108HmacCounterKdf.DeriveBytes 方法

定義

多載

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

衍生指定長度的索引鍵。

DeriveBytes(Byte[], HashAlgorithmName, String, String, Int32)

衍生指定長度的索引鍵。

DeriveBytes(ReadOnlySpan<Byte>, HashAlgorithmName, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32)

衍生指定長度的索引鍵。

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

使用衍生的索引鍵填入緩衝區。

DeriveBytes(ReadOnlySpan<Byte>, HashAlgorithmName, ReadOnlySpan<Char>, ReadOnlySpan<Char>, Int32)

衍生指定長度的索引鍵。

DeriveBytes(ReadOnlySpan<Byte>, HashAlgorithmName, ReadOnlySpan<Char>, ReadOnlySpan<Char>, Span<Byte>)

使用衍生的索引鍵填入緩衝區。

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

來源:
SP800108HmacCounterKdf.cs
來源:
SP800108HmacCounterKdf.cs

衍生指定長度的索引鍵。

public:
 static cli::array <System::Byte> ^ DeriveBytes(cli::array <System::Byte> ^ key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, cli::array <System::Byte> ^ label, cli::array <System::Byte> ^ context, int derivedKeyLengthInBytes);
public static byte[] DeriveBytes (byte[] key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, byte[] label, byte[] context, int derivedKeyLengthInBytes);
static member DeriveBytes : byte[] * System.Security.Cryptography.HashAlgorithmName * byte[] * byte[] * int -> byte[]
Public Shared Function DeriveBytes (key As Byte(), hashAlgorithm As HashAlgorithmName, label As Byte(), context As Byte(), derivedKeyLengthInBytes As Integer) As Byte()

參數

key
Byte[]

金鑰衍生金鑰。

hashAlgorithm
HashAlgorithmName

HMAC 演算法。

label
Byte[]

識別衍生金鑰用途的標籤。

context
Byte[]

包含衍生金鑰相關資訊的內容。

derivedKeyLengthInBytes
Int32

衍生金鑰的長度,以位元組為單位。

傳回

Byte[]

包含衍生索引鍵的陣列。

例外狀況

keynull

-或-

labelnull

-或-

contextnull

-或-

hashAlgorithmName具有 ,其為 null

hashAlgorithmName具有空白的 。

derivedKeyLengthInBytes 為負數或大於可衍生的位元組數目上限。

hashAlgorithm 不是已知或支援的雜湊演算法。

目前的平臺沒有支援的 HMAC 實作。

適用於

DeriveBytes(Byte[], HashAlgorithmName, String, String, Int32)

來源:
SP800108HmacCounterKdf.cs
來源:
SP800108HmacCounterKdf.cs

衍生指定長度的索引鍵。

public:
 static cli::array <System::Byte> ^ DeriveBytes(cli::array <System::Byte> ^ key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, System::String ^ label, System::String ^ context, int derivedKeyLengthInBytes);
public static byte[] DeriveBytes (byte[] key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, string label, string context, int derivedKeyLengthInBytes);
static member DeriveBytes : byte[] * System.Security.Cryptography.HashAlgorithmName * string * string * int -> byte[]
Public Shared Function DeriveBytes (key As Byte(), hashAlgorithm As HashAlgorithmName, label As String, context As String, derivedKeyLengthInBytes As Integer) As Byte()

參數

key
Byte[]

金鑰衍生金鑰。

hashAlgorithm
HashAlgorithmName

HMAC 演算法。

label
String

識別衍生金鑰用途的標籤。

context
String

包含衍生金鑰相關資訊的內容。

derivedKeyLengthInBytes
Int32

衍生金鑰的長度,以位元組為單位。

傳回

Byte[]

包含衍生索引鍵的陣列。

例外狀況

keynull

-或-

labelnull

-或-

contextnull

-或-

hashAlgorithmName具有 ,其為 null

hashAlgorithmName具有空白的 。

derivedKeyLengthInBytes 為負數或大於可衍生的位元組數目上限。

hashAlgorithm 不是已知或支援的雜湊演算法。

labelcontext 包含無法轉換成 UTF-8 的文字。

目前的平臺沒有支援的 HMAC 實作。

備註

labelcontext 將會使用 UTF-8 編碼轉換成位元組。 對於其他編碼方式,請使用所需的編碼方式執行轉換,並使用多載來接受標籤和內容做為位元組序列。

適用於

DeriveBytes(ReadOnlySpan<Byte>, HashAlgorithmName, ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32)

來源:
SP800108HmacCounterKdf.cs
來源:
SP800108HmacCounterKdf.cs

衍生指定長度的索引鍵。

public:
 static cli::array <System::Byte> ^ DeriveBytes(ReadOnlySpan<System::Byte> key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<System::Byte> label, ReadOnlySpan<System::Byte> context, int derivedKeyLengthInBytes);
public static byte[] DeriveBytes (ReadOnlySpan<byte> key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> label, ReadOnlySpan<byte> context, int derivedKeyLengthInBytes);
static member DeriveBytes : ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> * ReadOnlySpan<byte> * int -> byte[]
Public Shared Function DeriveBytes (key As ReadOnlySpan(Of Byte), hashAlgorithm As HashAlgorithmName, label As ReadOnlySpan(Of Byte), context As ReadOnlySpan(Of Byte), derivedKeyLengthInBytes As Integer) As Byte()

參數

key
ReadOnlySpan<Byte>

金鑰衍生金鑰。

hashAlgorithm
HashAlgorithmName

HMAC 演算法。

label
ReadOnlySpan<Byte>

識別衍生金鑰用途的標籤。

context
ReadOnlySpan<Byte>

包含衍生金鑰相關資訊的內容。

derivedKeyLengthInBytes
Int32

衍生金鑰的長度,以位元組為單位。

傳回

Byte[]

包含衍生索引鍵的陣列。

例外狀況

hashAlgorithmName具有 ,其為 null

hashAlgorithmName具有空白的 。

derivedKeyLengthInBytes 為負數或大於可衍生的位元組數目上限。

hashAlgorithm 不是已知或支援的雜湊演算法。

目前的平臺沒有支援的 HMAC 實作。

適用於

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

來源:
SP800108HmacCounterKdf.cs
來源:
SP800108HmacCounterKdf.cs

使用衍生的索引鍵填入緩衝區。

public:
 static void DeriveBytes(ReadOnlySpan<System::Byte> key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<System::Byte> label, ReadOnlySpan<System::Byte> context, Span<System::Byte> destination);
public static void DeriveBytes (ReadOnlySpan<byte> key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> label, ReadOnlySpan<byte> context, Span<byte> destination);
static member DeriveBytes : ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> * ReadOnlySpan<byte> * Span<byte> -> unit
Public Shared Sub DeriveBytes (key As ReadOnlySpan(Of Byte), hashAlgorithm As HashAlgorithmName, label As ReadOnlySpan(Of Byte), context As ReadOnlySpan(Of Byte), destination As Span(Of Byte))

參數

key
ReadOnlySpan<Byte>

金鑰衍生金鑰。

hashAlgorithm
HashAlgorithmName

HMAC 演算法。

label
ReadOnlySpan<Byte>

識別衍生金鑰用途的標籤。

context
ReadOnlySpan<Byte>

包含衍生金鑰相關資訊的內容。

destination
Span<Byte>

將接收衍生金鑰的緩衝區。

例外狀況

hashAlgorithmName具有 ,其為 null

hashAlgorithmName具有空白的 。

destination 大於可衍生的位元組數目上限。

hashAlgorithm 不是已知或支援的雜湊演算法。

目前的平臺沒有支援的 HMAC 實作。

適用於

DeriveBytes(ReadOnlySpan<Byte>, HashAlgorithmName, ReadOnlySpan<Char>, ReadOnlySpan<Char>, Int32)

來源:
SP800108HmacCounterKdf.cs
來源:
SP800108HmacCounterKdf.cs

衍生指定長度的索引鍵。

public:
 static cli::array <System::Byte> ^ DeriveBytes(ReadOnlySpan<System::Byte> key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<char> label, ReadOnlySpan<char> context, int derivedKeyLengthInBytes);
public static byte[] DeriveBytes (ReadOnlySpan<byte> key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<char> label, ReadOnlySpan<char> context, int derivedKeyLengthInBytes);
static member DeriveBytes : ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<char> * ReadOnlySpan<char> * int -> byte[]
Public Shared Function DeriveBytes (key As ReadOnlySpan(Of Byte), hashAlgorithm As HashAlgorithmName, label As ReadOnlySpan(Of Char), context As ReadOnlySpan(Of Char), derivedKeyLengthInBytes As Integer) As Byte()

參數

key
ReadOnlySpan<Byte>

金鑰衍生金鑰。

hashAlgorithm
HashAlgorithmName

HMAC 演算法。

label
ReadOnlySpan<Char>

識別衍生金鑰用途的標籤。

context
ReadOnlySpan<Char>

包含衍生金鑰相關資訊的內容。

derivedKeyLengthInBytes
Int32

衍生金鑰的長度,以位元組為單位。

傳回

Byte[]

包含衍生索引鍵的陣列。

例外狀況

hashAlgorithmName具有 ,其為 null

hashAlgorithmName具有空白的 。

derivedKeyLengthInBytes 為負數或大於可衍生的位元組數目上限。

hashAlgorithm 不是已知或支援的雜湊演算法。

labelcontext 包含無法轉換成 UTF-8 的文字。

目前的平臺沒有支援的 HMAC 實作。

備註

labelcontext 將會使用 UTF-8 編碼轉換成位元組。 對於其他編碼方式,請使用所需的編碼方式執行轉換,並使用多載來接受標籤和內容做為位元組序列。

適用於

DeriveBytes(ReadOnlySpan<Byte>, HashAlgorithmName, ReadOnlySpan<Char>, ReadOnlySpan<Char>, Span<Byte>)

來源:
SP800108HmacCounterKdf.cs
來源:
SP800108HmacCounterKdf.cs

使用衍生的索引鍵填入緩衝區。

public:
 static void DeriveBytes(ReadOnlySpan<System::Byte> key, System::Security::Cryptography::HashAlgorithmName hashAlgorithm, ReadOnlySpan<char> label, ReadOnlySpan<char> context, Span<System::Byte> destination);
public static void DeriveBytes (ReadOnlySpan<byte> key, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, ReadOnlySpan<char> label, ReadOnlySpan<char> context, Span<byte> destination);
static member DeriveBytes : ReadOnlySpan<byte> * System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<char> * ReadOnlySpan<char> * Span<byte> -> unit
Public Shared Sub DeriveBytes (key As ReadOnlySpan(Of Byte), hashAlgorithm As HashAlgorithmName, label As ReadOnlySpan(Of Char), context As ReadOnlySpan(Of Char), destination As Span(Of Byte))

參數

key
ReadOnlySpan<Byte>

金鑰衍生金鑰。

hashAlgorithm
HashAlgorithmName

HMAC 演算法。

label
ReadOnlySpan<Char>

識別衍生金鑰用途的標籤。

context
ReadOnlySpan<Char>

包含衍生金鑰相關資訊的內容。

destination
Span<Byte>

將接收衍生金鑰的緩衝區。

例外狀況

hashAlgorithmName具有 ,其為 null

hashAlgorithmName具有空白的 。

destination 大於可衍生的位元組數目上限。

hashAlgorithm 不是已知或支援的雜湊演算法。

labelcontext 包含無法轉換成 UTF-8 的文字。

目前的平臺沒有支援的 HMAC 實作。

備註

labelcontext 將會使用 UTF-8 編碼轉換成位元組。 對於其他編碼方式,請使用所需的編碼方式執行轉換,並使用多載來接受標籤和內容做為位元組序列。

適用於