How do I create a SHA1 hash in ruby?

quackingduck picture quackingduck · Aug 29, 2008 · Viewed 87.8k times · Source

Answer

devstopfix picture devstopfix · Aug 29, 2008
require 'digest/sha1'
Digest::SHA1.hexdigest 'foo'