×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Python
Posted by: M. Chris
Added: Apr 24, 2019 9:06 AM
Views: 3872
Tags: no tags
  1. def md5(fname):
  2.     hash_md5 = hashlib.md5()
  3.     with open(fname, "rb") as f:
  4.         for chunk in iter(lambda: f.read(4096), b""):
  5.             hash_md5.update(chunk)
  6.     return hash_md5.hexdigest()