Skip to content

Latest commit

 

History

History
89 lines (67 loc) · 3.37 KB

nf-bcrypt-bcrypthash.md

File metadata and controls

89 lines (67 loc) · 3.37 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:bcrypt.BCryptHash
BCryptHash function (bcrypt.h)
Performs a single hash computation. This is a convenience function that wraps calls to BCryptCreateHash, BCryptHashData, BCryptFinishHash, and BCryptDestroyHash.
BCryptHash
BCryptHash function [Security]
bcrypt/BCryptHash
security.bcrypthash
security\bcrypthash.htm
security
F0FF9B6D-1345-480A-BE13-BE90547407BF
12/05/2018
BCryptHash, BCryptHash function [Security], bcrypt/BCryptHash, security.bcrypthash
bcrypt.h
Windows
Windows 10 [desktop apps \| UWP apps]
Windows Server 2016 [desktop apps \| UWP apps]
Bcrypt.lib
Bcrypt.dll
Windows
19H1
BCryptHash
bcrypt/BCryptHash
c++
APIRef
kbSyntax
DllExport
bcrypt.dll
BCryptHash

BCryptHash function

-description

Performs a single hash computation. This is a convenience function that wraps calls to BCryptCreateHash, BCryptHashData, BCryptFinishHash, and BCryptDestroyHash.

-parameters

-param hAlgorithm

The handle of an algorithm provider created by using the BCryptOpenAlgorithmProvider function. The algorithm that was specified when the provider was created must support the hash interface.

-param pbSecret

A pointer to a buffer that contains the key to use for the hash or MAC. The cbSecret parameter contains the size of this buffer. This key only applies to hash algorithms opened by the BCryptOpenAlgorithmProvider function by using the BCRYPT_ALG_HANDLE_HMAC flag. Otherwise, set this parameter to NULL

-param cbSecret

The size, in bytes, of the pbSecret buffer. If no key is used, set this parameter to zero.

-param pbInput

A pointer to a buffer that contains the data to process. The cbInput parameter contains the number of bytes in this buffer. This function does not modify the contents of this buffer.

-param cbInput

The number of bytes in the pbInput buffer.

-param pbOutput

A pointer to a buffer that receives the hash or MAC value. The cbOutput parameter contains the size of this buffer.

-param cbOutput

The size, in bytes, of the pbOutput buffer. This size must exactly match the size of the hash or MAC value.

The size can be obtained by calling the BCryptGetProperty function to get the BCRYPT_HASH_LENGTH property. This will provide the size of the hash or MAC value for the specified algorithm.

-returns

A status code indicating success or failure.