Hashes a memory block.
#Include <WinAPIEx.au3>
_WinAPI_HashData ( $pMemory, $iSize [, $iLength] )
$pMemory | A pointer to a memory block containing data to hash. |
$iSize | The size of the memory block, in bytes. |
$iLength | [可选参数] The length of the hash data, in bytes. It should be no larger than 256, otherwise, the function fails. |
Success | The hash data in binary form. |
失败: | 返回 0 并设置 @error 标志为非 0 值, @extended 标志可能包含一个系统错误代码. |
在MSDN中搜索
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global $bData, $tData, $pData, $iSize
$bData = Binary('0x00112233445566778899AABBCCDDEEFF00112233445566778899AABBCCDDEEFF00112233445566778899AABBCCDDEEFF00112233445566778899AABBCCDDEEFF')
$iSize = BinaryLen($bData)
$tData = DllStructCreate('byte[' & $iSize & ']')
$pData = DllStructGetPtr($tData)
DllStructSetData($tData, 1, $bData)
ConsoleWrite(_WinAPI_HashData($pData, $iSize) & @CR)