From: Brian Candler Date: 2007-03-30T15:02:14+09:00 Subject: Re: How to md5 a string? 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.