Saturday, July 05, 2014

How to create md5 hash of a string in Ruby

Its interesting to creating an md5 hash of string in Ruby!!!

Here is example for it:

2.1.1 :001 > require 'digest/md5' 
 => true 
2.1.1 :002 > Digest::MD5.hexdigest('Sachin Gevariya') 
 => "a113803787ccfd74d2c954c00108722c"
Reactions:

0 comments:

Post a Comment