MessageEventBodyModel class
The body of a message event. The message's payload is encrypted in payload using a one-time symmetric encryption key.
keys is an index of all of the recipient device's public signing keys. Each value is an encrypted copy of the one-time message key used to decrypt payload. The session key is encrypted using the recipient device's public asymmetric encryption key. The shared secret can be decrypted using a combination of the sender device's public encryption key and the recipient device's private encryption key as per X25519.
- Inheritance
-
- Object
- EventBodyModel
- MessageEventBodyModel
Constructors
-
MessageEventBodyModel({required List<
String> peers, required Map<String, String> keys, required String encryptionKey, required String payload, List<NetworkMediaModel> attachments = const []}) - MessageEventBodyModel.fromJson(Json json)
-
factory
Properties
-
attachments
→ List<
NetworkMediaModel> -
List of media attachments.
final
- encryptionKey → String
-
The encryption public key of the sender device.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
keys
→ Map<
String, String> -
The index of recipient device public signing keys to the session key, each encrypted with the device's public encryption key.
final
- payload → String
-
The message payload encrypted by the one-time message session key.
final
-
peers
→ List<
String> -
The list of peer recipients.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → EventType
-
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Json -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited