[Possible Bug-Python2.3.2] MD5 module?

  • Thread starter Jean-Guillaume Paradis
  • Start date
J

Jean-Guillaume Paradis

Hi,

I've tried to use the md5 module of python 2.3.3, and the results of
a hash do not concord with those of reference sites such as
http://bfl.rctek.com/tools/?tool=hasher

I call it using

import md5
m = md5.new()
m.update("a")
print m.hexdigest()


I have not checked if the problem is the same on more recent version
though
 
P

Peter L Hansen

Jean-Guillaume Paradis said:
Hi,

I've tried to use the md5 module of python 2.3.3, and the results of
a hash do not concord with those of reference sites such as
http://bfl.rctek.com/tools/?tool=hasher

I call it using

import md5
m = md5.new()
m.update("a")
print m.hexdigest()


I have not checked if the problem is the same on more recent version
though

Try again. The two examples you cite, though you for some reason
didn't bother showing your actual output, both produce the same
result for me, namely:
0cc175b9c0f1b6a831c399e269772661


And from the source for the rctek.com web page mentioned above, aftering
entering "a" in the box:

<label for="string">Enter a string to hash:
<input type="text" id="string" name="string" value="a" /></label>
<input type="submit" value="Submit" class="submit" />
<label for="hash">Hash of string:
<input type="text" id="hash" value="0cc175b9c0f1b6a831c399e269772661"
readonly="readonly" /></label>


-Peter
 
B

Bengt Richter

Hi,

I've tried to use the md5 module of python 2.3.3, and the results of
a hash do not concord with those of reference sites such as
http://bfl.rctek.com/tools/?tool=hasher

I call it using

import md5
m = md5.new()
m.update("a")
print m.hexdigest()


I have not checked if the problem is the same on more recent version
though
Why don't you show the result that you think is wrong instead of making useless
work for anyone interested?

Here is what I get:
0cc175b9c0f1b6a831c399e269772661

Now if you do the same with your reference implementation, we can get somewhere ;-)
BTW, I seem to have the same version as you (if you are on windows):
'2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)]'

Regards,
Bengt Richter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,266
Latest member
DavidaAlla

Latest Threads

Top