daily pastebin goal
9%
SHARE
TWEET

Untitled

a guest Apr 28th, 2011 2,229 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top