[Dev-luatex] md5.sum

Hartmut Henkel hartmut_henkel at gmx.de
Tue Dec 22 01:01:40 CET 2009


On Mon, 21 Dec 2009, T T wrote:
> 2009/12/21 Hans Hagen <pragma at wxs.nl>:
> >> Something seems to be wrong with the library:
> >>
> >> For example
> >>
> >> $echo -n "test" | md5sum 098f6bcd4621d373cade4e832627b4f6  -
> >>
> >> but
> >>
> >> print(md5.sumhexa("test")) gives
> >>
> >> 0944483cd90a293923c8244520132de1
> >
> > strange, as on my machine (vista) it gives
> >
> > 098f6bcd4621d373cade4e832627b4f6
> >
>
> Same here on WinXP with luatex beta-0.40.6-2009110118 &
> beta-0.46.0-2009112716.
>
> I don't know what gives. I did test Reinhard's installer on the same
> machine and with the same binaries and it failed on checksums back
> then.

seems to be a 32/64 bit issue. After sprinkling the md5.c code with 32
bit MASKs (see diff) luatex indeed gives the correct
098f6bcd4621d373cade4e832627b4f6 on an x86_64 AMD debian Linux PC.
Unclear which MASK made it, but i guess it's in the rotate().

Regards, Hartmut
-------------- next part --------------
A non-text attachment was scrubbed...
Name: md5.diff
Type: text/x-diff
Size: 1844 bytes
Desc: md5.diff
URL: <http://www.ntg.nl/mailman/private/dev-luatex/attachments/20091222/ee9b9ec5/attachment.diff>


More information about the dev-luatex mailing list