Struct olm_rs::outbound_group_session::OlmOutboundGroupSession[][src]

pub struct OlmOutboundGroupSession { /* fields omitted */ }
Expand description

An out-bound group session is responsible for encrypting outgoing communication in a Megolm session.

Implementations

Creates a new instance of OlmOutboundGroupSession.

C-API equivalent

olm_init_outbound_group_session

Panics

  • NotEnoughRandom for creation

Serialises an OlmOutboundGroupSession to encrypted Base64.

C-API equivalent

olm_pickle_outbound_group_session

Panics

  • OutputBufferTooSmall for pickled buffer
  • on malformed UTF-8 coding of the pickling provided by libolm

Deserialises from encrypted Base64 that was previously obtained by pickling an OlmOutboundGroupSession.

C-API equivalent

olm_unpickle_outbound_group_session

Errors

  • BadAccountKey if the key doesn’t match the one the session was encrypted with
  • InvalidBase64 if decoding the supplied pickled string slice fails

Encrypts a plaintext message using the session.

C-API equivalent

  • olm_group_encrypt

Panics

  • OutputBufferTooSmall for encrypted message
  • on malformed UTF-8 coding of the ciphertext provided by libolm

Get the current message index for this session.

Each message is sent with an increasing index; this returns the index for the next message.

C-API equivalent

  • olm_outbound_group_session_message_index

Get a base64-encoded identifier for this session.

C-API equivalent

  • olm_outbound_group_session_id

Panics

  • OutputBufferTooSmall for too small ID buffer
  • on malformed UTF-8 coding of the session ID provided by libolm

Get the base64-encoded current ratchet key for this session.

Each message is sent with a different ratchet key. This function returns the ratchet key that will be used for the next message.

C-API equivalent

  • olm_outbound_group_session_key

Panics

  • OutputBufferTooSmall for too small session key buffer
  • on malformed UTF-8 coding of the session key provided by libolm

Trait Implementations

Returns the “default value” for a type. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.