SP800108HmacCounterKdf.DeriveKey Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
DeriveKey(Byte[], Byte[], Int32) |
Derives a key of a specified length. |
DeriveKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Int32) |
Derives a key of a specified length. |
DeriveKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>, Span<Byte>) |
Fills a buffer with a derived key. |
DeriveKey(ReadOnlySpan<Char>, ReadOnlySpan<Char>, Int32) |
Derives a key of a specified length. |
DeriveKey(ReadOnlySpan<Char>, ReadOnlySpan<Char>, Span<Byte>) |
Fills a buffer with a derived key. |
DeriveKey(String, String, Int32) |
Derives a key of a specified length. |
- Source:
- SP800108HmacCounterKdf.cs
- Source:
- SP800108HmacCounterKdf.cs
Derives a key of a specified length.
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()
Parameters
- label
- Byte[]
The label that identifies the purpose for the derived key.
- context
- Byte[]
The context containing information related to the derived key.
- derivedKeyLengthInBytes
- Int32
The length of the derived key, in bytes.
Returns
An array containing the derived key.
Exceptions
derivedKeyLengthInBytes
is negative or larger than the maximum number of bytes
that can be derived.
Applies to
.NET 9 og aðrar útgáfur
Vara | Útgáfur |
---|---|
.NET | 8, 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
- Source:
- SP800108HmacCounterKdf.cs
- Source:
- SP800108HmacCounterKdf.cs
Derives a key of a specified length.
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()
Parameters
- label
- ReadOnlySpan<Byte>
The label that identifies the purpose for the derived key.
- context
- ReadOnlySpan<Byte>
The context containing information related to the derived key.
- derivedKeyLengthInBytes
- Int32
The length of the derived key, in bytes.
Returns
An array containing the derived key.
Exceptions
derivedKeyLengthInBytes
is negative or larger than the maximum number of bytes
that can be derived.
Applies to
.NET 9 og aðrar útgáfur
Vara | Útgáfur |
---|---|
.NET | 8, 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
- Source:
- SP800108HmacCounterKdf.cs
- Source:
- SP800108HmacCounterKdf.cs
Fills a buffer with a derived key.
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))
Parameters
- label
- ReadOnlySpan<Byte>
The label that identifies the purpose for the derived key.
- context
- ReadOnlySpan<Byte>
The context containing information related to the derived key.
Exceptions
destination
is larger than the maximum number of bytes that can be derived.
Applies to
.NET 9 og aðrar útgáfur
Vara | Útgáfur |
---|---|
.NET | 8, 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
- Source:
- SP800108HmacCounterKdf.cs
- Source:
- SP800108HmacCounterKdf.cs
Derives a key of a specified length.
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()
Parameters
- label
- ReadOnlySpan<Char>
The label that identifies the purpose for the derived key.
- context
- ReadOnlySpan<Char>
The context containing information related to the derived key.
- derivedKeyLengthInBytes
- Int32
The length of the derived key, in bytes.
Returns
An array containing the derived key.
Exceptions
derivedKeyLengthInBytes
is negative or larger than the maximum number of bytes
that can be derived.
label
or context
contains text that cannot be converted to UTF-8.
Remarks
label
and context
will be converted to bytes using the UTF-8 encoding. for other encodings, perform the conversion using the desired encoding and use an overload which accepts the label and context as a sequence of bytes.
Applies to
.NET 9 og aðrar útgáfur
Vara | Útgáfur |
---|---|
.NET | 8, 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
- Source:
- SP800108HmacCounterKdf.cs
- Source:
- SP800108HmacCounterKdf.cs
Fills a buffer with a derived key.
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))
Parameters
- label
- ReadOnlySpan<Char>
The label that identifies the purpose for the derived key.
- context
- ReadOnlySpan<Char>
The context containing information related to the derived key.
Exceptions
destination
is larger than the maximum number of bytes that can be derived.
label
or context
contains text that cannot be converted to UTF-8.
Remarks
label
and context
will be converted to bytes using the UTF-8 encoding. for other encodings, perform the conversion using the desired encoding and use an overload which accepts the label and context as a sequence of bytes.
Applies to
.NET 9 og aðrar útgáfur
Vara | Útgáfur |
---|---|
.NET | 8, 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
- Source:
- SP800108HmacCounterKdf.cs
- Source:
- SP800108HmacCounterKdf.cs
Derives a key of a specified length.
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()
Parameters
- label
- String
The label that identifies the purpose for the derived key.
- context
- String
The context containing information related to the derived key.
- derivedKeyLengthInBytes
- Int32
The length of the derived key, in bytes.
Returns
An array containing the derived key.
Exceptions
derivedKeyLengthInBytes
is negative or larger than the maximum number of bytes
that can be derived.
label
or context
contains text that cannot be converted to UTF-8.
Remarks
label
and context
will be converted to bytes using the UTF-8 encoding. for other encodings, perform the conversion using the desired encoding and use an overload which accepts the label and context as a sequence of bytes.
Applies to
.NET 9 og aðrar útgáfur
Vara | Útgáfur |
---|---|
.NET | 8, 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
.NET umsögn
.NET er opið verkefni. Veldu tengil til að gefa umsögn: