Card key
1 def key(c,k) 2 Digest::SHA1.hexdigest(c.to_s).to_s[0..2] + Digest::SHA1.hexdigest(k.to_s).to_s[0..2] 3 end
DZone Snippets > peter > mrp
12963 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/
1 def key(c,k) 2 Digest::SHA1.hexdigest(c.to_s).to_s[0..2] + Digest::SHA1.hexdigest(k.to_s).to_s[0..2] 3 end