SHARE
TWEET

Untitled

a guest Apr 28th, 2011 1,662 Never
  1. def Hasher(algorithm, blocksize):
  2.     def hash_file(file):
  3.         hash = algorithm()
  4.         with open(file, 'rb') as f:
  5.             for chunk in iter(lambda: f.read(4096), ''):
  6.                 hash.update(chunk)
  7.         return hash.hexdigest()
  8.     return hash_file
RAW Paste Data
Top