[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in md5sum ?
From: |
Jim Meyering |
Subject: |
Re: Bug in md5sum ? |
Date: |
Sat Nov 30 06:19:02 2002 |
"Fabiani, Martin" <address@hidden> wrote:
> we have tested md5sum and found that it doesn't calculate the results of the
> testcases in RFC1321 (see
> http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc1321.html ). The same problem
> appears to md5. The only solution we've found working correctly is the
> Perl-Module Digest::MD5...
>
> These errors appear under Win2k and different versions of Solaris.
>
> --- extract from RFC1321 ---
>
> MD5 ("") = d41d8cd98f00b204e9800998ecf8427e
...
> But the results under Win2k pro are:
>
> C:\work\perl\basics\md5>echo "" | md5sum
> 2f8f3230bbc42e379a1554ca3419d46d *-
...
Thanks for the report, but the problem is in your tests.
`echo ""' (which is the same as `echo') outputs a single newline
character. Note that those test inputs contain no newline bytes.
So if you want to do tests on the command line, I suggest that
you use printf -- or find a version of echo that supports the `-n' option.
printf '' | /dev/null
printf a | md5sum
BTW, if you get the latest package
(note that it's now called coreutils)
ftp://alpha.gnu.org/gnu/fetish/coreutils-4.5.3.tar.gz
and build (e.g., on solaris), then type `make check', that will
run tests, including those from RFC1321, of most tools that are built.
- Bug in md5sum ?, Fabiani, Martin, 2002/11/29
- Re: Bug in md5sum ?,
Jim Meyering <=