From: Clifford Heath Date: 2007-03-30T13:20:05+09:00 Subject: Re: How to md5 a string? 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? Try: p my_string.split(//) and see if you get the same sequence of bytes you expect other tools to see. Also try "puts my_string.size" to verify the byte count.