Olm.Session (olm v0.1.0-rc) View Source

Functions for working with Olm Sessions.

Link to this section Summary

Functions

Decrypts a message using the session.

Encrypts a message using the session.

An identifier for this session.

Checks if the pre key message is for this in-bound session.

Checks if the pre key message is for this in-bound session and includes an identity key check.

Creates a new in-bound session for sending/receiving messages from an incoming pre key message.

Creates a new in-bound session for sending/receiving messages from an incoming pre key message and includes an identity key check.

Creates a new out-bound session for sending messages to a given peer identity key and one time key.

Stores a session as a base64 string.

Loads a session from a pickled base64 string.

Link to this section Functions

Link to this function

decrypt_message(session_ref, type, cyphertext)

View Source

Decrypts a message using the session.

Link to this function

encrypt_message(session_ref, plaintext)

View Source

Encrypts a message using the session.

An identifier for this session.

Will be the same for both ends of the conversation.

Link to this function

match_inbound(session_ref, message)

View Source

Checks if the pre key message is for this in-bound session.

Link to this function

match_inbound(session_ref, message, peer_id_key)

View Source

Checks if the pre key message is for this in-bound session and includes an identity key check.

Link to this function

new_inbound(account_ref, message)

View Source

Creates a new in-bound session for sending/receiving messages from an incoming pre key message.

Link to this function

new_inbound(account_ref, message, peer_id_key)

View Source

Creates a new in-bound session for sending/receiving messages from an incoming pre key message and includes an identity key check.

Link to this function

new_outbound(account_ref, peer_id_key, peer_one_time_key)

View Source

Creates a new out-bound session for sending messages to a given peer identity key and one time key.

Link to this function

pickle(session_ref, key)

View Source

Stores a session as a base64 string.

Link to this function

unpickle(pickled_session, key)

View Source

Loads a session from a pickled base64 string.