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:
authorJanek Bevendorff <janek@jbev.net>2018-09-29 20:00:47 +0300
committerJanek Bevendorff <janek@jbev.net>2018-10-19 22:49:54 +0300
commit113c8eb702dbdfefaf23a76bfe69603b54522b28 (patch)
tree32cbffa6b7368f5f69c9092cbbed2d2031b76800 /tests/TestSymmetricCipher.h
parent18b22834c1d9657ab98ca5160571e51837bb6366 (diff)
Add CLI tests and improve coding style and i18n
The CLI module was lacking unit test coverage and showed some severe coding style violations, which this patch addresses. In addition, all uses of qCritical() with untranslatble raw char* sequences were removed in favor of proper locale strings. These are written to STDERR through QTextStreams and support output redirection for testing purposes. With this change, error messages don't depend on the global Qt logging settings and targets anymore and go directly to the terminal or into a file if needed. This patch also fixes a bug discovered during unit test development, where the extract command would just dump the raw XML contents without decrypting embedded Salsa20-protected values first, making the XML export mostly useless, since passwords are scrambled. Lastly, all CLI commands received a dedicated -h/--help option.
Diffstat (limited to 'tests/TestSymmetricCipher.h')
-rw-r--r--tests/TestSymmetricCipher.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/TestSymmetricCipher.h b/tests/TestSymmetricCipher.h
index 9b82fd88a..5eede0953 100644
--- a/tests/TestSymmetricCipher.h
+++ b/tests/TestSymmetricCipher.h
@@ -27,12 +27,13 @@ class TestSymmetricCipher : public QObject
private slots:
void initTestCase();
- void testAes128CbcEncryption();
- void testAes128CbcDecryption();
- void testAes256CbcEncryption();
- void testAes256CbcDecryption();
- void testAes256CtrEncryption();
- void testAes256CtrDecryption();
+ void testAlgorithmToCipher();
+ void testEncryptionDecryption_data();
+ void testEncryptionDecryption();
+ void testAesCbcPadding_data();
+ void testAesCbcPadding();
+ void testInplaceEcb_data();
+ void testInplaceEcb();
void testTwofish256CbcEncryption();
void testTwofish256CbcDecryption();
void testSalsa20();