# Function Reference

# _WinAPI_HashData

Hashes a memory block

#include <WinAPIConv.au3>
_WinAPI_HashData ( $pMemory, $iSize [, $iLength = 32] )

## Parameters

$pMemory | A pointer to a memory block containing data to hash.
$iSize | The size of the memory block, in bytes.
$iLength | [optional] The length of the hash data, in bytes. It should be no larger than 256, otherwise, the function fails. Default is 32.

## Return Value

Success: | The hash data in binary form.
Failure: | Sets the @error flag to non-zero, @extended flag may contain the HRESULT error code.

## See Also

Search HashData in MSDN Library.

## Example

    #include <WinAPIConv.au3>

    Local $bData = Binary('0x00112233445566778899AABBCCDDEEFF00112233445566778899AABBCCDDEEFF00112233445566778899AABBCCDDEEFF00112233445566778899AABBCCDDEEFF')
    Local $iSize = BinaryLen($bData)
    Local $tData = DllStructCreate('byte[' & $iSize & ']')
    DllStructSetData($tData, 1, $bData)

    ConsoleWrite(_WinAPI_HashData($tData, $iSize) & @CRLF)