Just for info:
For MD4 and MD5 you use MDxInit, MDxUpdate & MDxFinal Functions.
For SHA1 you use the CryptX-Functions but you can use here the A_SHAInit, A_SHAUpdate & A_SHAFinal Functions who are similar to the other two (and should be faster than the CryptX...)
Small Hash Example for Strings (need to be rewritten for files like you do for MD4 & MD5):
MsgBox(0, "SHA", _SHA("test"))
Func _SHA($string)
Static Local $hDLL = DllOpen("advapi32.dll")
Static Local $SHA_CTX = DllStructCreate("dword unknown[6];dword state[5];dword count[2];ubyte buffer[64];ubyte digest[20]")
DllCall($hDLL, "none", "A_SHAInit", "ptr", DllStructGetPtr($SHA_CTX))
DllCall($hDLL, "none", "A_SHAUpdate", "ptr", DllStructGetPtr($SHA_CTX), "str", $string, "dword", StringLen($string))
DllCall($hDLL, "none", "A_SHAFinal", "ptr", DllStructGetPtr($SHA_CTX), "ptr", DllStructGetPtr($SHA_CTX) + 0x74)
return Hex(DllStructGetData($SHA_CTX, "digest"))
EndFunc
Ref: https://autoit.de/index.php/Thread/83602-Alternative-Hash-Funktion-f%C3%BCr-MD4-MD5-SHA-1/