Created
July 8, 2009 20:54
-
-
Save jacqui/143185 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[40, 49] in /Users/jacqui/Code/Eastmedia/mdb/vendor/gems/authlogic-2.1.1/lib/authlogic/crypto_providers/sha512.rb | |
40 digest | |
41 end | |
42 | |
43 # Does the crypted password match the tokens? Uses the same tokens that were used to encrypt. | |
44 def matches?(crypted, *tokens) | |
=> 45 encrypt(*tokens) == crypted | |
46 end | |
(rdb:1) crypted | |
"57a03a9ac4103d7dd2ec34af9e343a262b8927e5" | |
(rdb:1) tokens | |
["yourface", "TK6n9etsUZRcT--fCobN"] | |
(rdb:1) encrypt("yourface", User.first.password_salt) | |
"7c94c1ed647eb489b23ecabc15a9c3a48195c332fe19a6d278051ab982bf1a3ae3c51ff88fc6bc3b76839399f3ec97142f8efe37fb3733283374c8a1581a2069" | |
(rdb:1) User.count | |
1 | |
(rdb:1) User.first.crypted_password | |
"57a03a9ac4103d7dd2ec34af9e343a262b8927e5" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment