method

validate_message_data_format

validate_message_data_format(data, level)
private

No documentation available.

# File activerecord/lib/active_record/encryption/message_serializer.rb, line 42
        def validate_message_data_format(data, level)
          if level > 2
            raise ActiveRecord::Encryption::Errors::Decryption, "More than one level of hash nesting in headers is not supported"
          end

          unless data.is_a?(Hash) && data.has_key?("p")
            raise ActiveRecord::Encryption::Errors::Decryption, "Invalid data format: hash without payload"
          end
        end