[H-GEN] md5sum generation

David Seikel onefang at gmail.com
Mon Mar 27 01:45:10 EST 2006


On Mon, 27 Mar 2006 16:39:52 +1000 Rick Phillips <rickp at suntech.net.au>
wrote:

> [ Humbug *General* list - semi-serious discussions about Humbug
> and     ] [ Unix-related topics. Posts from non-subscribed addresses
> will vanish. ]
> 
> > > I know I cannot generate a checksum by doing -
> > > 
> > > md5sum password
> > > 
> > > but I can generate at checksum on a file containing the single
> > > password. Doing it this way would be tedious and would lead to
> > > errors.
> > 
> > Either of these commands given to bash:
> > 
> >   echo "password" | md5sum
> >   md5sum <<<"$password"
> > 
> > will do it on a single line, if that is what you
> > want.
> 
> Thanks Russell but these two lines don't give a result consistent with
> the database.
> 
> If I create a text file with blahblah in it and run "md5sum
> textfile", I get 42d388f8b1db997faaf7dab487f11290
> 
> If I run either of the other two examples, I get
> 7ec306b6fa01510ffc4e0d0fac97c23e (I assume the "$" above is a typo as
> this gives yet another result.

Does the text file have some sort of line ending in it?  If so, that
line ending is being included in the md5sum calculation.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20060327/2f0020ac/attachment.sig>


More information about the General mailing list