libQuotient
A Qt library for building matrix clients
|
Either an outbound or inbound session for secure communication. More...
#include <qolmsession.h>
Public Member Functions | |
QByteArray | pickle (const PicklingKey &key) const |
Serialises an QOlmSession to encrypted Base64. | |
QOlmMessage | encrypt (const QByteArray &plaintext) const |
Encrypts a plaintext message using the session. | |
QOlmExpected< QByteArray > | decrypt (const QOlmMessage &message) const |
QByteArray | sessionId () const |
Get a base64-encoded identifier for this session. | |
bool | hasReceivedMessage () const |
Checker for any received messages for this session. | |
bool | matchesInboundSession (const QOlmMessage &preKeyMessage) const |
Checks if the 'prekey' message is for this in-bound session. | |
bool | matchesInboundSessionFrom (QByteArray theirIdentityKey, const QOlmMessage &preKeyMessage) const |
Checks if the 'prekey' message is for this in-bound session. | |
OlmErrorCode | lastErrorCode () const |
const char * | lastError () const |
Static Public Member Functions | |
static QOlmExpected< QOlmSession > | unpickle (QByteArray &&pickled, const PicklingKey &key) |
Deserialises from encrypted Base64 previously made with pickle() | |
Friends | |
class | QOlmAccount |
bool | operator< (const QOlmSession &lhs, const QOlmSession &rhs) |
Either an outbound or inbound session for secure communication.
Definition at line 17 of file qolmsession.h.
QOlmExpected< QByteArray > Quotient::QOlmSession::decrypt | ( | const QOlmMessage & | message | ) | const |
Decrypts a message using this session. Decoding is lossy, meaning if the decrypted plaintext contains invalid UTF-8 symbols, they will be returned as U+FFFD
.
QOlmMessage Quotient::QOlmSession::encrypt | ( | const QByteArray & | plaintext | ) | const |
Encrypts a plaintext message using the session.
bool Quotient::QOlmSession::hasReceivedMessage | ( | ) | const |
Checker for any received messages for this session.
OlmErrorCode Quotient::QOlmSession::lastErrorCode | ( | ) | const |
bool Quotient::QOlmSession::matchesInboundSession | ( | const QOlmMessage & | preKeyMessage | ) | const |
Checks if the 'prekey' message is for this in-bound session.
bool Quotient::QOlmSession::matchesInboundSessionFrom | ( | QByteArray | theirIdentityKey, |
const QOlmMessage & | preKeyMessage | ||
) | const |
Checks if the 'prekey' message is for this in-bound session.
QByteArray Quotient::QOlmSession::pickle | ( | const PicklingKey & | key | ) | const |
Serialises an QOlmSession
to encrypted Base64.
QByteArray Quotient::QOlmSession::sessionId | ( | ) | const |
Get a base64-encoded identifier for this session.
|
static |
Deserialises from encrypted Base64 previously made with pickle()
|
friend |
Definition at line 48 of file qolmsession.h.
|
friend |
Definition at line 61 of file qolmsession.h.