diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-05-31 18:58:27 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-05-31 18:58:27 +0200 |
commit | 21ae4eca4c06e500ec04a52ad42772bf8e8e9b6f (patch) | |
tree | 271fe41d8d9d0a5eecfd07d16973c30b4b1c9e8c /lib/e2ee/qolmaccount.h | |
parent | 42811660094c88a4a1bfa8bd8ace5f4b148c246a (diff) | |
download | libquotient-21ae4eca4c06e500ec04a52ad42772bf8e8e9b6f.tar.gz libquotient-21ae4eca4c06e500ec04a52ad42772bf8e8e9b6f.zip |
Tweak QOlmAccount and data structures around
This is mainly to plug the definition of a string-to-variant map
for one-time keys (see
https://spec.matrix.org/v1.2/client-server-api/#key-algorithms) into
the CS API generated code (see the "shortcut OneTimeKeys" commit for
gtad.yaml); but along with it came considerable streamlining of code
in qolmaccount.cpp. Using std::variant to store that map also warranted
converters.h to gain support for that type (even wider than toJson()
that is already in dev - a non-trivial merge from dev is in order).
Diffstat (limited to 'lib/e2ee/qolmaccount.h')
-rw-r--r-- | lib/e2ee/qolmaccount.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/e2ee/qolmaccount.h b/lib/e2ee/qolmaccount.h index ee2aa69d..23fe58dd 100644 --- a/lib/e2ee/qolmaccount.h +++ b/lib/e2ee/qolmaccount.h @@ -59,17 +59,14 @@ public: size_t generateOneTimeKeys(size_t numberOfKeys); //! Gets the OlmAccount's one time keys formatted as JSON. - OneTimeKeys oneTimeKeys() const; + UnsignedOneTimeKeys oneTimeKeys() const; //! Sign all one time keys. - QHash<QString, SignedOneTimeKey> signOneTimeKeys(const OneTimeKeys &keys) const; - - //! Sign one time key. - QByteArray signOneTimeKey(const QString &key) const; + OneTimeKeys signOneTimeKeys(const UnsignedOneTimeKeys &keys) const; SignedOneTimeKey signedOneTimeKey(const QByteArray &key, const QString &signature) const; - UploadKeysJob *createUploadKeyRequest(const OneTimeKeys &oneTimeKeys); + UploadKeysJob* createUploadKeyRequest(const UnsignedOneTimeKeys& oneTimeKeys) const; DeviceKeys deviceKeys() const; |