Crate olm_rs[][src]

This is a wrapper for libolm. It exposes all original functionality, split into task oriented modules.

This wrapper takes care of memory allocation for you, so all functions in the original library exposing the buffer length of certain read/write buffers (and similar functionality) are not exposed by this wrapper.

Random number generation is also handled internally and hence there are no function arguments for supplying random data.

All errors of the type NOT_ENOUGH_RANDOM and OUTPUT_BUFFER_TOO_SMALL from libolm that are encountered result in a panic, as they are unrecoverably fatal. In case a function can panic, it is annotated as such in the documentation.

Panics should technically never happen however.

Modules

account

This module wraps around all functions following the pattern olm_account_*.

errors

A collection of all errors that can be returned by libolm.

inbound_group_session

This module wraps around all functions in inbound_group_session.h.

outbound_group_session

This module wraps around all functions in outbound_group_session.h.

session

This module wraps around all functions following the pattern olm_session_*, as well as functions for encryption and decryption using the Double Ratchet algorithm.

utility

This module wraps around all functions following the pattern olm_utility_*.

Structs

OlmVersion

Used for storing the version number of libolm. Solely returned by get_library_version().

Functions

get_library_version

Returns the version number of the currently utilised libolm.