diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-09-21 16:11:39 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-09-26 10:46:34 +0200 |
commit | bc1ded73bedf593acda80b00eb7da32f688c4843 (patch) | |
tree | 48867f314c028cdf4ddb17d72ef964f5f5954b89 /lib/connection.cpp | |
parent | bcc05aa1d52cae2b6d8e70bb6cf04fa49904687a (diff) | |
download | libquotient-bc1ded73bedf593acda80b00eb7da32f688c4843.tar.gz libquotient-bc1ded73bedf593acda80b00eb7da32f688c4843.zip |
RandomBuffer
A convenient abstraction swallowing all the type casts and, more
importantly, cleanup on destruction (previous code only cleaned up
the buffer upon a successful call to Olm API but not upon an error).
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r-- | lib/connection.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp index f38bb751..cd8ee727 100644 --- a/lib/connection.cpp +++ b/lib/connection.cpp @@ -614,7 +614,7 @@ void Connection::Private::completeSetup(const QString& mxId) loop.exec(); if (job.error() == QKeychain::Error::EntryNotFound) { - picklingMode = Encrypted { getRandom(128) }; + picklingMode = Encrypted { RandomBuffer(128) }; QKeychain::WritePasswordJob job(qAppName()); job.setAutoDelete(false); job.setKey(accountSettings.userId() + QStringLiteral("-Pickle")); |