Sha256: 17faad6ef738346633f6a391173d74eb637c86e71d0bad10e377d298fd2e62ed
Contents?: true
Size: 447 Bytes
Versions: 30
Compression:
Stored size: 447 Bytes
Contents
module Zena module CryptoProvider class Initial def self.encrypt(*tokens) # encrypt password (old bad method: SHA1, no stretching, no per-password salt) Digest::SHA1.hexdigest((tokens.flatten.shift || '') + PASSWORD_SALT) end def self.matches?(crypted_password, *tokens) # return true if the tokens match the crypted_password encrypt(*tokens) == crypted_password end end end end
Version data entries
30 entries across 30 versions & 1 rubygems