libkazv
|
The action to encrypt an megolm event for a room. More...
#include <client-model.hpp>
Static Public Member Functions | |
static std::size_t | maxRandomSize () |
static std::size_t | minRandomSize () |
Public Attributes | |
std::string | roomId |
The id of the room to encrypt for. More... | |
Event | e |
The event to encrypt. More... | |
Timestamp | timeMs |
The timestamp, to determine whether the session should expire. More... | |
RandomData | random |
Random data for the operation. More... | |
The action to encrypt an megolm event for a room.
If the action is successful, the result r
will be such that r.dataJson("encrypted")
contains the encrypted event json.
If the megolm session is rotated, r.dataStr("key")
will contain the key of the megolm session. Otherwise, r.data().contains("key")
will be false.
The Action may fail due to insufficient random data, when the megolm session needs to be rotated. In this case, the reducer for the Action will fail, and its result r
will be such that r.dataStr("reason") == "NotEnoughRandom"
. The user needs to provide random data of at least size maxRandomSize()
.
|
static |
|
static |
Event Kazv::EncryptMegOlmEventAction::e |
The event to encrypt.
RandomData Kazv::EncryptMegOlmEventAction::random |
Random data for the operation.
Must be of at least size minRandomSize()
. If this is a retry of the previous operation due to NotEnoughRandom, it must be of at least size maxRandomSize()
.
std::string Kazv::EncryptMegOlmEventAction::roomId |
The id of the room to encrypt for.
Timestamp Kazv::EncryptMegOlmEventAction::timeMs |
The timestamp, to determine whether the session should expire.