NoobsWeStand
Member
Hello,
I have a quick question on why these two md5 functions would differ?
I am using md5_file in game maker, and sending the hash over to a server to verify a file.
The server is using Python's hashlib to compute the hash of a file it has on its end.
If I have the same file for GM and Python, I get a different hash result from the files.
Here is the code for GM:
md5=md5_file("myfile.txt")
Here is the code for Python:
hashlib.md5(open("myfile.txt",'rb').read()).hexdigest()
I have also tried this in Python:
hashlib.md5(open("myfile.txt",'r').read().encode('utf-8')).hexdigest()
I am not sure what I am doing wrong. Any help would be much appreciated
I have a quick question on why these two md5 functions would differ?
I am using md5_file in game maker, and sending the hash over to a server to verify a file.
The server is using Python's hashlib to compute the hash of a file it has on its end.
If I have the same file for GM and Python, I get a different hash result from the files.
Here is the code for GM:
md5=md5_file("myfile.txt")
Here is the code for Python:
hashlib.md5(open("myfile.txt",'rb').read()).hexdigest()
I have also tried this in Python:
hashlib.md5(open("myfile.txt",'r').read().encode('utf-8')).hexdigest()
I am not sure what I am doing wrong. Any help would be much appreciated