Brian Candler
3/30/2007 6:02:00 AM
On Fri, Mar 30, 2007 at 12:13:14PM +0900, Bontina Chen wrote:
>
> I'm using hexdigest in Digest/MD5 but got totally different outputs from
> other tools.
> I got some clues that in windows I should read the source I would like
> to hash with binary mode.
> But I have no idea how to transform a string to binary mode.
> Anyone could give my some suggestion?
Your sources must be byte-for-byte identical, including any newlines.
e.g.
echo "hello" | md5sum
echo -n "hello" | md5sum
will give different answers.