Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def Hasher(algorithm, blocksize):
- def hash_file(file):
- hash = algorithm()
- with open(file, 'rb') as f:
- for chunk in iter(lambda: f.read(4096), ''):
- hash.update(chunk)
- return hash.hexdigest()
- return hash_file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement