Sha256: 3cf18c97c58c722bb4038d7e60d87ae32062d65d0b04434502cdcf817d148118
Contents?: true
Size: 577 Bytes
Versions: 5
Compression:
Stored size: 577 Bytes
Contents
module SimpleAuth class Config # Generate the password hash. The specified block should expected # the plain password and the password hash as block parameters. cattr_accessor :crypter @@crypter = proc do |password, salt| Digest::SHA256.hexdigest [password, salt].join("--") end # Generate the password salt. The specified block should expect # the ActiveRecord instance as block parameter. cattr_accessor :salt @@salt = proc do |record| Digest::SHA256.hexdigest [Time.to_s, SecureRandom.hex(32)].join("--") end end end
Version data entries
5 entries across 5 versions & 1 rubygems