Export (0) Print
Expand All

BCryptDestroyHash function

The BCryptDestroyHash function destroys a hash or Message Authentication Code (MAC) object.

Syntax


NTSTATUS WINAPI BCryptDestroyHash(
  _Inout_ BCRYPT_HASH_HANDLE hHash
);

Parameters

hHash [in, out]

The handle of the hash or MAC object to destroy. This handle is obtained by using the BCryptCreateHash function.

Return value

Returns a status code that indicates the success or failure of the function.

Possible return codes include, but are not limited to, the following.

Return codeDescription
STATUS_SUCCESS

The function was successful.

STATUS_INVALID_HANDLE

The algorithm handle in the hHash parameter is not valid.

 

Remarks

Depending on what processor modes a provider supports, BCryptDestroyHash can be called either from user mode or kernel mode. Kernel mode callers can execute either at PASSIVE_LEVEL IRQL or DISPATCH_LEVEL IRQL. If the current IRQL level is DISPATCH_LEVEL, the handle provided in the hHash parameter must be derived from an algorithm handle returned by a provider that was opened by using the BCRYPT_PROV_DISPATCH flag.

To call this function in kernel mode, use Cng.lib, which is part of the Driver Development Kit (DDK). For more information, see WDK and Developer Tools.

Windows Server 2008 and Windows Vista:  To call this function in kernel mode, use Ksecdd.lib.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Bcrypt.h

Library

Bcrypt.lib

DLL

Bcrypt.dll

See also

BCryptCreateHash

 

 

Community Additions

ADD
Show:
© 2015 Microsoft