Module: Sequel::Plugins::Password

Defined in:
lib/sequel_password.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods Classes: BCryptHasher, BCryptSHA256Hasher, Hasher, InvalidHasherException, PBKDF2Hasher, SHA1Hasher

Class Method Summary collapse

Class Method Details

.configure(model, options = {}) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/sequel_password.rb', line 12

def self.configure(model, options = {})
  model.instance_eval do
    @column = options.fetch(:column, :digest)
    @hashers = options.fetch(:hashers,
      pbkdf2_sha256: PBKDF2Hasher.new,
      bcrypt_sha256: BCryptSHA256Hasher.new,
      bcrypt: BCryptHasher.new,
      sha1: SHA1Hasher.new)
  end
end