instance method decryption_keys

Ruby on Rails 8.1.2

Since v7.0.10

Available in: v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

decryption_keys(encrypted_message)

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.

Parameters

encrypted_message req
Source
# 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

Defined in activerecord/lib/active_record/encryption/key_provider.rb line 32 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Encryption::KeyProvider

Type at least 2 characters to search.

↑↓ navigate · open · esc close