summaryrefslogtreecommitdiff
path: root/hash/__init__.py
blob: 0fc17157752b8d677297d026b43c1f6f08bfdc11 (plain)
1
2
3
4
5
6
7
8
9
10
11
from _hash import *

def file_hash(name):
	h = Hash()
	f = open(name)
	data = f.read(32768)	
	while data:
		h.update(data)
		data = f.read(32768)
	f.close()
	return h