KeyDerivation.Pbkdf2(String, Byte[], KeyDerivationPrf, Int32, Int32) Method

Definition

Performs key derivation using the PBKDF2 algorithm.

public:
 static cli::array <System::Byte> ^ Pbkdf2(System::String ^ password, cli::array <System::Byte> ^ salt, Microsoft::AspNetCore::Cryptography::KeyDerivation::KeyDerivationPrf prf, int iterationCount, int numBytesRequested);
public static byte[] Pbkdf2 (string password, byte[] salt, Microsoft.AspNetCore.Cryptography.KeyDerivation.KeyDerivationPrf prf, int iterationCount, int numBytesRequested);
static member Pbkdf2 : string * byte[] * Microsoft.AspNetCore.Cryptography.KeyDerivation.KeyDerivationPrf * int * int -> byte[]
Public Shared Function Pbkdf2 (password As String, salt As Byte(), prf As KeyDerivationPrf, iterationCount As Integer, numBytesRequested As Integer) As Byte()

Parameters

password
String

The password from which to derive the key.

salt
Byte[]

The salt to be used during the key derivation process.

prf
KeyDerivationPrf

The pseudo-random function to be used in the key derivation process.

iterationCount
Int32

The number of iterations of the pseudo-random function to apply during the key derivation process.

numBytesRequested
Int32

The desired length (in bytes) of the derived key.

Returns

Byte[]

The derived key.

Remarks

The PBKDF2 algorithm is specified in RFC 2898.

Applies to