Re: MD5 hash query

From: Robert Collins <robert.collins@dont-contact.us>
Date: Sat, 29 Dec 2001 00:07:59 +1100

===
----- Original Message -----
From: "Joe Cooper" <joe@swelltech.com>

> > Secondly, find some way of feeding that into perls MD5 module.
Note -
> > and this is the most important thing - that feeding '1' in when the
> > binary value is '\1' is wrong. I'm no perl programmer, so
pack/unpack
> > don't mean much to me, but if they perform _any_ conversion you will
get
> > the wrong results.
>
> I'm afraid I'm not getting this part? Isn't conversion what /is/
needed
> here, if I'm starting with a base ten 1 and need a binary 1 to be fed
> into MD5?

MD5 is a mathematical algorithm - it operates on binary all the time.
When it's fed "mary had a little lamb" MD5 is passed unsigned byte
data[22]; So no conversion is needed - it's being passed the binary
length and value of the method variable.

Rob
Received on Fri Dec 28 2001 - 06:08:02 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:42 MST