aboutsummaryrefslogtreecommitdiff
path: root/lib/keyverificationsession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/keyverificationsession.cpp')
-rw-r--r--lib/keyverificationsession.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/keyverificationsession.cpp b/lib/keyverificationsession.cpp
index f5d49561..4c61964c 100644
--- a/lib/keyverificationsession.cpp
+++ b/lib/keyverificationsession.cpp
@@ -71,9 +71,8 @@ void KeyVerificationSession::init(milliseconds timeout)
QTimer::singleShot(timeout, this, [this] { cancelVerification(TIMEOUT); });
m_sas = olm_sas(new std::byte[olm_sas_size()]);
- auto randomSize = olm_create_sas_random_length(m_sas);
- auto random = getRandom(randomSize);
- olm_create_sas(m_sas, random.data(), randomSize);
+ const auto randomLength = olm_create_sas_random_length(m_sas);
+ olm_create_sas(m_sas, RandomBuffer(randomLength), randomLength);
}
KeyVerificationSession::~KeyVerificationSession()