From d1a4bbf693ad14f2ea0a308fef61db95161a17b7 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Fri, 26 Aug 2022 23:36:39 +0200 Subject: Fix device verification QByteArrays don't like interacting with QStrings --- lib/keyverificationsession.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/keyverificationsession.cpp b/lib/keyverificationsession.cpp index 2c468c3e..44a085fe 100644 --- a/lib/keyverificationsession.cpp +++ b/lib/keyverificationsession.cpp @@ -163,7 +163,7 @@ void KeyVerificationSession::handleKey(const KeyVerificationKeyEvent& event) if (startSentByUs) { const auto paddedCommitment = - QCryptographicHash::hash((eventKey % m_startEvent).toLatin1(), + QCryptographicHash::hash((event.key() % m_startEvent).toLatin1(), QCryptographicHash::Sha256) .toBase64(); const QLatin1String unpaddedCommitment(paddedCommitment.constData(), @@ -189,7 +189,7 @@ void KeyVerificationSession::handleKey(const KeyVerificationKeyEvent& event) const auto info = infoTemplate .arg(m_connection->userId(), m_connection->deviceId(), key.data(), m_remoteUserId, m_remoteDeviceId, - eventKey, m_transactionId) + event.key(), m_transactionId) .toLatin1(); olm_sas_generate_bytes(m_sas, info.data(), info.size(), output.data(), output.size()); -- cgit v1.2.3