mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-03 15:15:02 -04:00
Fixes for minor issues found by static analysis
Mostly style issues. I used the following tools to find most of these: - lgtm.com - clang-tidy - cpplint - cppcheck
This commit is contained in:
parent
c663b5d5fc
commit
f62e0534a2
6 changed files with 18 additions and 24 deletions
|
@ -279,7 +279,6 @@ void TestSymmetricCipher::testTwofish256CbcEncryption()
|
|||
QByteArray::fromHex("6F725C5950133F82EF021A94CADC8508")};
|
||||
|
||||
SymmetricCipher cipher(SymmetricCipher::Twofish, SymmetricCipher::Cbc, SymmetricCipher::Encrypt);
|
||||
bool ok;
|
||||
|
||||
for (int i = 0; i < keys.size(); ++i) {
|
||||
QVERIFY(cipher.init(keys[i], ivs[i]));
|
||||
|
@ -287,6 +286,7 @@ void TestSymmetricCipher::testTwofish256CbcEncryption()
|
|||
QByteArray ctPrev = ivs[i];
|
||||
QByteArray ctCur;
|
||||
QCOMPARE(cipher.blockSize(), 16);
|
||||
bool ok = false;
|
||||
for (int j = 0; j < 5000; ++j) {
|
||||
ctCur = cipher.process(ptNext, &ok);
|
||||
if (!ok) {
|
||||
|
@ -335,13 +335,13 @@ void TestSymmetricCipher::testTwofish256CbcDecryption()
|
|||
QByteArray::fromHex("4C81F5BDC1081170FF96F50B1F76A566")};
|
||||
|
||||
SymmetricCipher cipher(SymmetricCipher::Twofish, SymmetricCipher::Cbc, SymmetricCipher::Decrypt);
|
||||
bool ok;
|
||||
|
||||
for (int i = 0; i < keys.size(); ++i) {
|
||||
cipher.init(keys[i], ivs[i]);
|
||||
QByteArray ctNext = cipherTexts[i];
|
||||
QByteArray ptCur;
|
||||
QCOMPARE(cipher.blockSize(), 16);
|
||||
bool ok = false;
|
||||
for (int j = 0; j < 5000; ++j) {
|
||||
ptCur = cipher.process(ctNext, &ok);
|
||||
if (!ok) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue