A message defines the structure of the data we store in encrypted attributes. It contains:
-
An encrypted payload
-
A list of unencrypted headers
Methods
Attributes
[RW] | headers | |
[RW] | payload |
Class Public methods
new(payload: nil, headers: {})
📝 Source code
# File activerecord/lib/active_record/encryption/message.rb, line 14
def initialize(payload: nil, headers: {})
validate_payload_type(payload)
@payload = payload
@headers = Properties.new(headers)
end
🔎 See on GitHub
Instance Public methods
==(other_message)
📝 Source code
# File activerecord/lib/active_record/encryption/message.rb, line 21
def ==(other_message)
payload == other_message.payload && headers == other_message.headers
end
🔎 See on GitHub