Created
December 17, 2014 07:08
-
-
Save xebecnan/9300d29a51c614b0aea6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
def get_file_md5(filename): | |
md5 = hashlib.md5() | |
with open(filename,'rb') as f: | |
for chunk in iter(lambda: f.read(128*md5.block_size), b''): | |
md5.update(chunk) | |
return md5.hexdigest() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment