libkazv
Kazv::EncryptMegOlmEventAction Struct Reference

The action to encrypt an megolm event for a room. More...

#include <client-model.hpp>

Collaboration diagram for Kazv::EncryptMegOlmEventAction:

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...
 

Detailed Description

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().

Member Function Documentation

◆ maxRandomSize()

std::size_t Kazv::EncryptMegOlmEventAction::maxRandomSize ( )
static

◆ minRandomSize()

std::size_t Kazv::EncryptMegOlmEventAction::minRandomSize ( )
static

Member Data Documentation

◆ e

Event Kazv::EncryptMegOlmEventAction::e

The event to encrypt.

◆ random

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().

◆ roomId

std::string Kazv::EncryptMegOlmEventAction::roomId

The id of the room to encrypt for.

◆ timeMs

Timestamp Kazv::EncryptMegOlmEventAction::timeMs

The timestamp, to determine whether the session should expire.


The documentation for this struct was generated from the following files: