BCryptDeriveKeyCapi function (bcrypt.h)
The BCryptDeriveKeyCapi function derives a key from a hash value.
This function is provided as a helper function to assist in migrating legacy Cryptography API (CAPI)–based applications to use Cryptography API: Next Generation (CNG). The BCryptDeriveKeyCapi function performs the key derivation in a manner that is compatible with the CAPI CryptDeriveKey function.
NTSTATUS BCryptDeriveKeyCapi( BCRYPT_HASH_HANDLE hHash, BCRYPT_ALG_HANDLE hTargetAlg, PUCHAR pbDerivedKey, ULONG cbDerivedKey, ULONG dwFlags );
A pointer to the buffer that receives the derived key.
The size, in characters, of the derived key 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 hHash or hTargetAlg parameter is not valid.|
||The value in the cbDerivedKey parameter is larger than twice the output size of the hash function.|
||A memory allocation failure occurred.|
This function does not support the PK salt functionality of the CAPI CryptDeriveKey function.
|Minimum supported client||Windows 7 [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2008 R2 [desktop apps | UWP apps]|