Help getting the md5 module to work

Grumfish nobody at nowhere.com
Sat Mar 20 03:10:32 CET 2004


I'm trying to use the md5 module but it gives me a different result from 
what other programs give. This is the code I have and the result from 
hexdigest() never matches what I expect. Its probably something stupid 
but its driving me crazy.

f = file (filename, "r")
m = md5.new()
data = f.read (CHUNK_SIZE)
while data != "":
	m.update (data)
	data = f.read (CHUNK_SIZE)



More information about the Python-list mailing list