From: 1337p337 <1337p337@...> Date: 2005-09-25T05:58:51+09:00 Subject: Re: MD5 function On 24/09/05, sandhya mittal wrote: > Can anyone tell how to implement MD5 function(NOT algorithm) in Ruby.I just want to hex MD5 a string.It would be of great help. It's actually pretty easy: require 'digest/md5' Digest::MD5.new 'a random string.' # => 8a6194e053d7a326fe301e902043bec1 This gets you a new Digest::MD5 object, which you'll usually .to_s. If all you want is a string, you can do Digest::MD5.hexdigest "Even randomer: #{rand}" # => "c69a37bb0328b781901665c671e1b367" which just returns a string. http://ruby-doc.org/stdlib/libdoc/digest/rdoc/index.html has more information.