method

build_encrypted_message

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: Encryptor
build_encrypted_message(clear_text, key_provider:, cipher_options:) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/encryption/encryptor.rb, line 88
        def build_encrypted_message(clear_text, key_provider,, cipher_options))
          key = key_provider.encryption_key

          clear_text, was_compressed = compress_if_worth_it(clear_text)
          cipher.encrypt(clear_text, key: key.secret, **cipher_options).tap do |message|
            message.headers.add(key.public_tags)
            message.headers.compressed = true if was_compressed
          end
        end
Register or log in to add new notes.