Class: ActiveRecord::Encryption::DerivedSecretKeyProvider

Inherits:
KeyProvider show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/encryption/derived_secret_key_provider.rb

Overview

A KeyProvider that derives keys from passwords.

Direct Known Subclasses

DeterministicKeyProvider

Instance Method Summary collapse

Methods inherited from KeyProvider

#decryption_keys, #encryption_key

Constructor Details

#initialize(passwords) ⇒ DerivedSecretKeyProvider

Returns a new instance of DerivedSecretKeyProvider.



7
8
9
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/encryption/derived_secret_key_provider.rb', line 7

def initialize(passwords)
  super(Array(passwords).collect { |password| Key.derive_from(password) })
end