instance method
protecting_encrypted_data
Ruby on Rails 7.1.6
Since v7.0.10Signature
protecting_encrypted_data(&block)
Runs the provided block in an encryption context where:
-
Reading encrypted content will return its ciphertext.
-
Writing encrypted content will fail.
Parameters
-
blockblock
Source
# File activerecord/lib/active_record/encryption/contexts.rb, line 57
def protecting_encrypted_data(&block)
with_encryption_context encryptor: ActiveRecord::Encryption::EncryptingOnlyEncryptor.new, frozen_encryption: true, &block
end
Defined in activerecord/lib/active_record/encryption/contexts.rb line 57
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Encryption::Contexts