Commit Graph

11 Commits

Author SHA1 Message Date
Janek Bevendorff
113c8eb702 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.
2018-10-19 21:49:54 +02:00
Toni Spets
d2359df2b0 SymmetricCipher: Add support for AES-128-CBC 2018-02-11 15:31:06 +01:00
angelsl
6a0d05e1ef
Add support for various algorithms for kdbx4
* Add SHA512 support to CryptoHash
* Add ChaCha20 support
* Add HMAC support
* Add new HmacBlockStream, used in KDBX 4
* Add support for ChaCha20 protected stream
2018-01-13 14:23:26 -05:00
Toni Spets
a81a5fa31b SymmetricCipher: Support CTR mode
Includes AES-256-CTR non-stream tests
2017-11-19 14:38:59 +02:00
thez3ro
a53b111182
Update and fix copyright headers 2017-06-14 15:54:43 +02:00
Janek Bevendorff
8d487d31a4
Replace Q_EMIT, Q_SIGNALS and Q_SLOTS macros with MOC keywords 2017-03-10 16:12:02 +01:00
Janek Bevendorff
75dc21c66d
Implement Twofish CBC encryption and decryption tests 2017-01-28 17:53:17 +01:00
Felix Geyer
98d9dae087 Test if reset() and close() write only one final block. 2015-07-20 21:51:32 +02:00
Felix Geyer
6504b6f2bd Drop Qt module name from include statements.
This is a preparation to be able to build KeePassX against Qt 5.
2013-10-03 15:18:16 +02:00
Felix Geyer
38e421d9c1 Fix padding handling in SymmetricCipherStream.
The implementation had two issues:
- It didn't add a block full of padding when the input size was a multiple
  of the block size.
- It didn't strip the padding when reading data.
2012-05-08 21:46:01 +02:00
Felix Geyer
230d24a123 No longer use automoc. 2010-11-21 23:06:30 +01:00