函数参考


_WinAPI_HashData

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 标志可能包含一个系统错误代码.

注意/说明

None

相关

详情参考

在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)