From: Michael Fellinger Date: 2010-04-19T06:16:47+09:00 Subject: Re: MD5 16 octet - how to compute? On Mon, Apr 19, 2010 at 3:26 AM, Shuaib Zahda wrote: > Hi there > > I am trying to compute the 16 octet MD5 hash. > I looked in the digest/md5 and i could not figure it out. > i used Digest::MD5.hexdigest(value) > but this computes 32 if I am not mistaken. > > Any idea please? MD5 computes a 128bit hash. If you use MD5.hexdigest, you will get a String representation in base 16, so it's 32 octets. You could use MD5.digest instead, which returns a String in base 255, that means it's 16 octets. -- Michael Fellinger CTO, The Rubyists, LLC