Container of configuration options
Methods
Attributes
[RW] | add_to_filter_parameters | |
[RW] | deterministic_key | |
[RW] | encrypt_fixtures | |
[RW] | excluded_from_filter_parameters | |
[RW] | extend_queries | |
[RW] | forced_encoding_for_deterministic_encryption | |
[RW] | hash_digest_class | |
[RW] | key_derivation_salt | |
[RW] | previous_schemes | |
[RW] | primary_key | |
[RW] | store_key_references | |
[RW] | support_unencrypted_data | |
[RW] | validate_column_size |
Class Public methods
new()
📝 Source code
# File activerecord/lib/active_record/encryption/config.rb, line 13
def initialize
set_defaults
end
🔎 See on GitHub
Instance Public methods
previous=(previous_schemes_properties)
Configure previous encryption schemes.
config.active_record.encryption.previous = [ { key_provider: MyOldKeyProvider.new } ]
📝 Source code
# File activerecord/lib/active_record/encryption/config.rb, line 20
def previous=(previous_schemes_properties)
previous_schemes_properties.each do |properties|
add_previous_scheme(**properties)
end
end
🔎 See on GitHub
support_sha1_for_non_deterministic_encryption=(value)
📝 Source code
# File activerecord/lib/active_record/encryption/config.rb, line 26
def support_sha1_for_non_deterministic_encryption=(value)
if value && has_primary_key?
sha1_key_generator = ActiveRecord::Encryption::KeyGenerator.new(hash_digest_class: OpenSSL::Digest::SHA1)
sha1_key_provider = ActiveRecord::Encryption::DerivedSecretKeyProvider.new(primary_key, key_generator: sha1_key_generator)
add_previous_scheme key_provider: sha1_key_provider
end
end
🔎 See on GitHub