From 304fc1edfa558e8ff199c702250f7ca048891d4c Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Fri, 29 Oct 2021 13:27:04 +0200 Subject: [PATCH] fix qt5 build --- src/librssguard/3rd-party/sc/simplecrypt.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/librssguard/3rd-party/sc/simplecrypt.cpp b/src/librssguard/3rd-party/sc/simplecrypt.cpp index 796568540..cf7297920 100644 --- a/src/librssguard/3rd-party/sc/simplecrypt.cpp +++ b/src/librssguard/3rd-party/sc/simplecrypt.cpp @@ -104,7 +104,11 @@ QByteArray SimpleCrypt::encryptToByteArray(QByteArray plaintext) { flags |= CryptoFlagChecksum; QDataStream s(&integrityProtection, QIODevice::WriteOnly); +#if QT_VERSION_MAJOR == 6 s << qChecksum(ba); +#else + s << qChecksum(ba, ba.length()); +#endif } else if (m_protectionMode == ProtectionHash) { flags |= CryptoFlagHash; @@ -228,7 +232,11 @@ QByteArray SimpleCrypt::decryptToByteArray(QByteArray cypher) { } ba = ba.mid(2); +#if QT_VERSION_MAJOR == 6 quint16 checksum = qChecksum(ba); +#else + quint16 checksum = qChecksum(ba, ba.length()); +#endif integrityOk = (checksum == storedChecksum); }