Card key
def key(c,k) Digest::SHA1.hexdigest(c.to_s).to_s[0..2] + Digest::SHA1.hexdigest(k.to_s).to_s[0..2] end
DZone Snippets > peter > mrb
12122 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Peter Cooperx http://www.petercooper.co.uk/
def key(c,k) Digest::SHA1.hexdigest(c.to_s).to_s[0..2] + Digest::SHA1.hexdigest(k.to_s).to_s[0..2] end