Skip to content

Instantly share code, notes, and snippets.

@shadowmaru
Created March 22, 2010 23:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shadowmaru/340696 to your computer and use it in GitHub Desktop.
Save shadowmaru/340696 to your computer and use it in GitHub Desktop.
class UserPasswordCryptMD5
def self.encrypt(*tokens)
Digest::MD5.hexdigest(*tokens)
end
def self.matches?(crypted_password, *tokens)
encrypt(*tokens) == crypted_password
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment