MD5 problem

Roel Schroeven rschroev_nospam_ml at fastmail.fm
Mon Jun 13 14:10:31 CEST 2005


fargo wrote:

> Hi.
> 
> I'm in trouble with the md5 module.
> 
> Under Linux, it's ok, I get real signatures.
> 
> The problem is under Windows XP, with some kind of files.
> 
> If I use the md5 module with .txt files, it'ok.
> 
> The Problem comes from the .msg files. I get the same signature for 
> every .msg file I try to hash with the md5 algorithm. I think some 
> character are strange for python, and makes it stop before the end of 
> the .msg file.

That sounds like you opened the file in text mode. For things like this 
it is better to open it in binary mode: file(filename, 'rb')


-- 
If I have been able to see further, it was only because I stood
on the shoulders of giants.  -- Isaac Newton

Roel Schroeven



More information about the Python-list mailing list