mirror of
https://github.com/martinrotter/rssguard.git
synced 2024-12-27 08:33:27 +01:00
fix qt5 build
This commit is contained in:
parent
729453a06a
commit
304fc1edfa
8
src/librssguard/3rd-party/sc/simplecrypt.cpp
vendored
8
src/librssguard/3rd-party/sc/simplecrypt.cpp
vendored
@ -104,7 +104,11 @@ QByteArray SimpleCrypt::encryptToByteArray(QByteArray plaintext) {
|
|||||||
flags |= CryptoFlagChecksum;
|
flags |= CryptoFlagChecksum;
|
||||||
QDataStream s(&integrityProtection, QIODevice::WriteOnly);
|
QDataStream s(&integrityProtection, QIODevice::WriteOnly);
|
||||||
|
|
||||||
|
#if QT_VERSION_MAJOR == 6
|
||||||
s << qChecksum(ba);
|
s << qChecksum(ba);
|
||||||
|
#else
|
||||||
|
s << qChecksum(ba, ba.length());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if (m_protectionMode == ProtectionHash) {
|
else if (m_protectionMode == ProtectionHash) {
|
||||||
flags |= CryptoFlagHash;
|
flags |= CryptoFlagHash;
|
||||||
@ -228,7 +232,11 @@ QByteArray SimpleCrypt::decryptToByteArray(QByteArray cypher) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ba = ba.mid(2);
|
ba = ba.mid(2);
|
||||||
|
#if QT_VERSION_MAJOR == 6
|
||||||
quint16 checksum = qChecksum(ba);
|
quint16 checksum = qChecksum(ba);
|
||||||
|
#else
|
||||||
|
quint16 checksum = qChecksum(ba, ba.length());
|
||||||
|
#endif
|
||||||
|
|
||||||
integrityOk = (checksum == storedChecksum);
|
integrityOk = (checksum == storedChecksum);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user