本帖最后由 xwei21 于 2022-1-15 08:47 编辑
msgbox(0,"",_encode_md5("lijianfeng"))
Func _encode_md5($string)
Static Local $hDLL = DllOpen("advapi32.dll")
Static Local $MD5_CTX = DllStructCreate("dword i[2];dword buf[4];ubyte in[64];ubyte digest[16]")
DllCall($hDLL, "none", "MD5Init", "ptr", DllStructGetPtr($MD5_CTX))
DllCall($hDLL, "none", "MD5Update", "ptr", DllStructGetPtr($MD5_CTX), "str", $string, "dword", StringLen($string))
DllCall($hDLL, "none", "MD5Final", "ptr", DllStructGetPtr($MD5_CTX))
Return Hex(DllStructGetData($MD5_CTX, "digest"))
EndFunc ;==>_encode_md5
麻烦哪位大哥帮下我改下这个代码,把md5生成的大写改为小写字母,谢谢啦! |