BCryptDeriveKeyPBKDF2 function (bcrypt.h)
NTSTATUS BCryptDeriveKeyPBKDF2( BCRYPT_ALG_HANDLE hPrf, PUCHAR pbPassword, ULONG cbPassword, PUCHAR pbSalt, ULONG cbSalt, ULONGLONG cIterations, PUCHAR pbDerivedKey, ULONG cbDerivedKey, ULONG dwFlags );
The handle of an algorithm provider that provides the pseudo-random function. This should be an algorithm provider that performs a Message Authentication Code computation. When you use the default Microsoft algorithm provider, any hashing algorithm opened by using the BCRYPT_ALG_HANDLE_HMAC_FLAG flag can be used.
A pointer to a buffer that contains the password parameter for the PBKDF2 key derivation algorithm.
The length, in bytes, of the data in the buffer pointed to by the pbPassword parameter.
A pointer to a buffer that contains the salt argument for the PBKDF2 key derivation algorithm.
The length, in bytes, of the salt argument pointed to by the pbSalt parameter.
The iteration count for the PBKDF2 key derivation algorithm.
A pointer to a buffer that receives the derived key.
The length, in bytes, of the derived key returned in the buffer pointed to by the pbDerivedKey parameter.
This parameter is reserved and must be set to zero.
Returns a status code that indicates the success or failure of the function.
Possible return codes include, but are not limited to, the following.
||The function was successful.|
||The handle in the hPrf parameter is not valid.|
||One or more parameters are not valid.|
||A memory allocation failure occurred.|
|Minimum supported client||Windows 7 [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2008 R2 [desktop apps | UWP apps]|