If one were to do the following:
def hashmdfive(filename):
"""Generate the md5 checksum."""
hasher = hashlib.md5()
with open(filename, "rb") as afile:
buf = afile.read()
hasher.update(buf)
return hasher.hexdigest()
test.txt) with some content.test.txt from remoteTHE HASHES ARE DIFFERENT. Does anyone know why that is the case?
If you are running on Windows, git's autocrlf feature can be the cause of a digest changing:
This will show you the current value:
git config --global core.autocrlf
Anything other than "False" can result in the behavior you are observing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With