aboutsummaryrefslogtreecommitdiff
path: root/lib/e2ee/qolmsession.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/e2ee/qolmsession.h')
-rw-r--r--lib/e2ee/qolmsession.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/e2ee/qolmsession.h b/lib/e2ee/qolmsession.h
index cc988a03..174e98ef 100644
--- a/lib/e2ee/qolmsession.h
+++ b/lib/e2ee/qolmsession.h
@@ -26,18 +26,18 @@ public:
const QOlmMessage& preKeyMessage);
static QOlmExpected<QOlmSessionPtr> createOutboundSession(
- QOlmAccount* account, const QString& theirIdentityKey,
- const QString& theirOneTimeKey);
+ QOlmAccount* account, const QByteArray& theirIdentityKey,
+ const QByteArray& theirOneTimeKey);
//! Serialises an `QOlmSession` to encrypted Base64.
QOlmExpected<QByteArray> pickle(const PicklingMode &mode) const;
- //! Deserialises from encrypted Base64 that was previously obtained by pickling a `QOlmSession`.
- static QOlmExpected<QOlmSessionPtr> unpickle(
- const QByteArray& pickled, const PicklingMode& mode);
+ //! Deserialises from encrypted Base64 previously made with pickle()
+ static QOlmExpected<QOlmSessionPtr> unpickle(QByteArray&& pickled,
+ const PicklingMode& mode);
//! Encrypts a plaintext message using the session.
- QOlmMessage encrypt(const QString &plaintext);
+ QOlmMessage encrypt(const QByteArray& plaintext);
//! Decrypts a message using this session. Decoding is lossy, meaning if
//! the decrypted plaintext contains invalid UTF-8 symbols, they will
@@ -47,9 +47,6 @@ public:
//! Get a base64-encoded identifier for this session.
QByteArray sessionId() const;
- //! The type of the next message that will be returned from encryption.
- QOlmMessage::Type encryptMessageType();
-
//! Checker for any received messages for this session.
bool hasReceivedMessage() const;