Επεξεργασία

Κοινή χρήση μέσω


HKDF.Expand Method

Definition

Overloads

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

Performs the HKDF-Expand function See section 2.3 of RFC5869.

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

Performs the HKDF-Expand function. See section 2.3 of RFC5869.

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

Source:
HKDF.cs
Source:
HKDF.cs
Source:
HKDF.cs

Performs the HKDF-Expand function See section 2.3 of RFC5869.

public static byte[] Expand (System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, byte[] prk, int outputLength, byte[]? info = default);
static member Expand : System.Security.Cryptography.HashAlgorithmName * byte[] * int * byte[] -> byte[]
Public Shared Function Expand (hashAlgorithmName As HashAlgorithmName, prk As Byte(), outputLength As Integer, Optional info As Byte() = Nothing) As Byte()

Parameters

hashAlgorithmName
HashAlgorithmName

The hash algorithm used for HMAC operations.

prk
Byte[]

The pseudorandom key that is at least as long as the output byte array of the specified hash algorithm (usually the output from the Extract step).

outputLength
Int32

The length of the output keying material.

info
Byte[]

The optional context and application specific information.

Returns

Byte[]

The output keying material.

Exceptions

prkis null.

outputLength is less than 1.

Applies to

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

Source:
HKDF.cs
Source:
HKDF.cs
Source:
HKDF.cs

Performs the HKDF-Expand function. See section 2.3 of RFC5869.

public:
 static void Expand(System::Security::Cryptography::HashAlgorithmName hashAlgorithmName, ReadOnlySpan<System::Byte> prk, Span<System::Byte> output, ReadOnlySpan<System::Byte> info);
public static void Expand (System.Security.Cryptography.HashAlgorithmName hashAlgorithmName, ReadOnlySpan<byte> prk, Span<byte> output, ReadOnlySpan<byte> info);
static member Expand : System.Security.Cryptography.HashAlgorithmName * ReadOnlySpan<byte> * Span<byte> * ReadOnlySpan<byte> -> unit
Public Shared Sub Expand (hashAlgorithmName As HashAlgorithmName, prk As ReadOnlySpan(Of Byte), output As Span(Of Byte), info As ReadOnlySpan(Of Byte))

Parameters

hashAlgorithmName
HashAlgorithmName

The hash algorithm used for HMAC operations.

prk
ReadOnlySpan<Byte>

The pseudorandom key that is at least as long as as the output byte array of the specified hash algorithm (usually the output from the Extract step).

output
Span<Byte>

The destination buffer to receive the output keying material.

info
ReadOnlySpan<Byte>

The context and application specific information (can be an empty span).

Exceptions

output is empty, or is larger than the maximum allowed length.

Applies to