Class: ActiveRecord::Encryption::Config
- Inherits:
-
Object
- Object
- ActiveRecord::Encryption::Config
- Defined in:
- lib/active_record/encryption/config.rb
Overview
Container of configuration options
Instance Attribute Summary collapse
-
#add_to_filter_parameters ⇒ Object
Returns the value of attribute add_to_filter_parameters.
-
#deterministic_key ⇒ Object
Returns the value of attribute deterministic_key.
-
#encrypt_fixtures ⇒ Object
Returns the value of attribute encrypt_fixtures.
-
#excluded_from_filter_parameters ⇒ Object
Returns the value of attribute excluded_from_filter_parameters.
-
#extend_queries ⇒ Object
Returns the value of attribute extend_queries.
-
#forced_encoding_for_deterministic_encryption ⇒ Object
Returns the value of attribute forced_encoding_for_deterministic_encryption.
-
#key_derivation_salt ⇒ Object
Returns the value of attribute key_derivation_salt.
-
#previous_schemes ⇒ Object
Returns the value of attribute previous_schemes.
-
#primary_key ⇒ Object
Returns the value of attribute primary_key.
-
#store_key_references ⇒ Object
Returns the value of attribute store_key_references.
-
#support_unencrypted_data ⇒ Object
Returns the value of attribute support_unencrypted_data.
-
#validate_column_size ⇒ Object
Returns the value of attribute validate_column_size.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
-
#previous=(previous_schemes_properties) ⇒ Object
Configure previous encryption schemes.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
11 12 13 |
# File 'lib/active_record/encryption/config.rb', line 11 def initialize set_defaults end |
Instance Attribute Details
#add_to_filter_parameters ⇒ Object
Returns the value of attribute add_to_filter_parameters.
7 8 9 |
# File 'lib/active_record/encryption/config.rb', line 7 def add_to_filter_parameters @add_to_filter_parameters end |
#deterministic_key ⇒ Object
Returns the value of attribute deterministic_key.
7 8 9 |
# File 'lib/active_record/encryption/config.rb', line 7 def deterministic_key @deterministic_key end |
#encrypt_fixtures ⇒ Object
Returns the value of attribute encrypt_fixtures.
7 8 9 |
# File 'lib/active_record/encryption/config.rb', line 7 def encrypt_fixtures @encrypt_fixtures end |
#excluded_from_filter_parameters ⇒ Object
Returns the value of attribute excluded_from_filter_parameters.
7 8 9 |
# File 'lib/active_record/encryption/config.rb', line 7 def excluded_from_filter_parameters @excluded_from_filter_parameters end |
#extend_queries ⇒ Object
Returns the value of attribute extend_queries.
7 8 9 |
# File 'lib/active_record/encryption/config.rb', line 7 def extend_queries @extend_queries end |
#forced_encoding_for_deterministic_encryption ⇒ Object
Returns the value of attribute forced_encoding_for_deterministic_encryption.
7 8 9 |
# File 'lib/active_record/encryption/config.rb', line 7 def forced_encoding_for_deterministic_encryption @forced_encoding_for_deterministic_encryption end |
#key_derivation_salt ⇒ Object
Returns the value of attribute key_derivation_salt.
7 8 9 |
# File 'lib/active_record/encryption/config.rb', line 7 def key_derivation_salt @key_derivation_salt end |
#previous_schemes ⇒ Object
Returns the value of attribute previous_schemes.
7 8 9 |
# File 'lib/active_record/encryption/config.rb', line 7 def previous_schemes @previous_schemes end |
#primary_key ⇒ Object
Returns the value of attribute primary_key.
7 8 9 |
# File 'lib/active_record/encryption/config.rb', line 7 def primary_key @primary_key end |
#store_key_references ⇒ Object
Returns the value of attribute store_key_references.
7 8 9 |
# File 'lib/active_record/encryption/config.rb', line 7 def store_key_references @store_key_references end |
#support_unencrypted_data ⇒ Object
Returns the value of attribute support_unencrypted_data.
7 8 9 |
# File 'lib/active_record/encryption/config.rb', line 7 def support_unencrypted_data @support_unencrypted_data end |
#validate_column_size ⇒ Object
Returns the value of attribute validate_column_size.
7 8 9 |
# File 'lib/active_record/encryption/config.rb', line 7 def validate_column_size @validate_column_size end |
Instance Method Details
#previous=(previous_schemes_properties) ⇒ Object
Configure previous encryption schemes.
config.active_record.encryption.previous = [ { key_provider: MyOldKeyProvider.new } ]
18 19 20 21 22 |
# File 'lib/active_record/encryption/config.rb', line 18 def previous=(previous_schemes_properties) previous_schemes_properties.each do |properties| add_previous_scheme(**properties) end end |