Method: ActiveRecord::Encryption::KeyProvider#decryption_keys

Defined in:
activerecord/lib/active_record/encryption/key_provider.rb

#decryption_keys(encrypted_message) ⇒ Object

Returns the list of decryption keys

When the message holds a reference to its encryption key, it will return an array with that key. If not, it will return the list of keys.



32
33
34
35
36
37
38
# File 'activerecord/lib/active_record/encryption/key_provider.rb', line 32

def decryption_keys(encrypted_message)
  if encrypted_message.headers.encrypted_data_key_id
    keys_grouped_by_id[encrypted_message.headers.encrypted_data_key_id]
  else
    @keys
  end
end