Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlo Teubner <carlo@cteubner.net>2019-11-24 17:40:16 +0300
committerJonathan White <support@dmapps.us>2020-02-02 16:46:58 +0300
commitf62e0534a23c2030c9c22e6f3db25148fcb486fd (patch)
tree80ecd223b335e999bbb6a7d903fe399000ecde95 /tests/TestSymmetricCipher.cpp
parentc663b5d5fcc3ed9f5af8d6e5e7fdf1e99f4a2c58 (diff)
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
Diffstat (limited to 'tests/TestSymmetricCipher.cpp')
-rw-r--r--tests/TestSymmetricCipher.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/TestSymmetricCipher.cpp b/tests/TestSymmetricCipher.cpp
index 173f328ee..bc872a510 100644
--- a/tests/TestSymmetricCipher.cpp
+++ b/tests/TestSymmetricCipher.cpp
@@ -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) {