Carlo Teubner
1af293847c
LayeredStream dtor: fully qualify 'close()' call
...
`close()` is a virtual function. Since we are calling it from a
destructor, make it clear that we are specifically calling the base
class (`QIODevice`) implementation, as opposed to an implementation in
any derived class.
[Found by lgtm.com](https://lgtm.com/projects/g/keepassxreboot/keepassxc/alerts )
2018-12-01 14:07:10 -05:00
Gianluca Recchia
fc930bae69
Restore correct formatting
...
Many lines were not conformant with the project's formatting rules.
This patch should fix all formatting and whitespace issues in the code
base.
A clang-format directive was put around the connect() calls containing
SIGNALs and SLOTs whose signatures would be denormalized because of the
formatting rules.
2018-11-28 18:29:15 -05:00
Gianluca Recchia
f9625189cb
Fix typo in parameter name
...
A typo in a parameter name caused an inconsistency between declaration
and definition of a function.
2018-11-28 18:29:14 -05:00
Gianluca Recchia
379c41d20c
Reduce unnecessary copies using move semantics
2018-10-31 15:16:04 +01:00
Gianluca Recchia
896a66e6d8
Improve readability and type-safety
...
Use nullptr instead of 0 or NULL to initialize a null pointer. In some
cases, readability was enhanced by replacing 0 with more meaningful
values according to the type of the pointer being initialized.
2018-10-31 15:16:04 +01:00
Gianluca Recchia
da9afd3f6f
Reduce number of unneeded copies
...
This patch aims at reducing the number of copies for obejcts that could
be referenced rather than copied, because they're not modified during
the computation.
2018-10-31 15:16:04 +01:00
Louis-Bertrand Varin
8324d03f0a
Formatting the code.
2018-03-31 16:01:30 -04:00
Janek Bevendorff
ccfd7a065c
Fix coding style and GUI test
2018-01-13 14:24:57 -05:00
Janek Bevendorff
0d6ca0945b
Reformat code, fix minor style issues, make kdf() getter const
2018-01-13 14:23:27 -05:00
Janek Bevendorff
d1a19a1009
Refactor Endian namespace
2018-01-13 14:23:27 -05: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
angelsl
a5ec7fc704
Make HashedBlockStream::atEnd report EOF correctly
2018-01-13 14:23:24 -05:00
angelsl
656836950e
Add support for stream cipher subclasses in SymmetricCipherStream
2018-01-13 14:23:24 -05:00
Janek Bevendorff
8d487d31a4
Replace Q_EMIT, Q_SIGNALS and Q_SLOTS macros with MOC keywords
2017-03-10 16:12:02 +01:00
Josh Soref
b8c93b3572
spelling: finish
2017-01-14 17:32:03 +01:00
Josh Soref
6060f41458
spelling: available
2017-01-14 17:31:38 +01:00
Felix Geyer
6e45cf0dab
Use C++11 keywords directly.
2015-10-11 10:47:30 +02:00
Felix Geyer
3b2a39fd38
Merge branch '2.0'
2015-09-26 11:44:27 +02:00
Felix Geyer
9d42db9849
Mark more methods as override.
2015-09-25 21:34:56 +02:00
Felix Geyer
7fa0eddc5f
Make C++11 mandatory.
2015-09-12 13:55:50 +02:00
Felix Geyer
abe5e8ecea
Don't write final block(s) if we already have.
2015-07-20 21:33:51 +02:00
Felix Geyer
61503a8047
SymmetricCipherStream: Add error handling when reading from the device.
2015-07-20 19:54:18 +02:00
Felix Geyer
fcb5deff0a
SymmetricCipherStream: Fix error string when detecting an error while writing.
2015-07-20 19:53:17 +02:00
Felix Geyer
7a2c02f0df
Initialize some instance variables in ctor.
...
Discovered by Coverity.
Most likely doesn't fix any actual bug but better be safe.
2015-05-14 16:58:53 +02:00
Felix Geyer
cfffdae573
Improve error reporing of layered streams.
2015-05-09 23:21:50 +02:00
Felix Geyer
a762cef0a9
Catch and handle all errors from libgcrypt.
2015-05-09 23:21:44 +02:00
dartraiden
3fca61dc24
spelling correction, fixed typos
2015-05-06 19:38:43 +03: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
5c84aa308d
Improve error messages for reading and wriiting databases.
...
Closes #7
2013-06-30 14:43:02 +02:00
Felix Geyer
98372f9df8
Drop unnecessary dllimport/dllexport statements in QtIOCompressor.
2013-03-29 16:31:26 +01:00
Felix Geyer
18d3fe55f8
Add support for database format 3.01 (HeaderHash).
...
Add test for the format 3.00 and upgrade Compressed.kdbx, NonAscii.kdbx
and ProtectedStrings.kdbx to 3.01.
Add a test for an incorrect HeaderHash.
2012-09-25 22:33:36 +02:00
Felix Geyer
8619682da3
Replace some more Q_WS_* with Q_OS_*.
2012-07-19 19:42:26 +02:00
Felix Geyer
e144f7c85a
Mark overriden methods as Q_DECL_OVERRIDE.
2012-06-29 14:37:29 +02:00
Felix Geyer
04edcf39f7
Remove unneeded include.
2012-05-20 22:22:25 +02:00
Felix Geyer
a407e0082b
Coding style improvements.
2012-05-14 19:10:42 +02:00
Felix Geyer
587a647c11
New TODO comment style.
...
Qt Creator 2.5 is able to parse those.
2012-05-11 12:39:06 +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
7649c781dc
Improve error handling in HashedBlockStream.
2012-05-06 20:19:20 +02:00
Felix Geyer
7865f5eee9
Fix some pedantic compiler warnings.
2012-04-26 11:59:53 +02:00
Felix Geyer
3df2ad35cb
Constification and some style fixes.
2012-04-23 21:09:01 +02:00
Felix Geyer
f28f868671
Coding style fixes.
2012-04-23 17:02:09 +02:00
Felix Geyer
7063f5296a
Fix memory leak in SymmetricCipherStream.
2012-04-22 22:26:05 +02:00
Felix Geyer
2e011d5362
Improve code style.
2012-04-18 22:08:22 +02:00
Felix Geyer
d4f02a78a7
Coding style fixes.
2011-07-08 14:51:14 +02:00
Felix Geyer
2c8da57ce5
Make some methods static.
2010-11-21 23:11:16 +01:00
Felix Geyer
e3da80fcc6
Add KeePass2Writer.
...
Support attributes MasterKeyChanged, MasterKeyChangeRec, MasterKeyChangeForce and Tags.
Close streams in the dtor.
2010-09-25 12:41:00 +02:00
Felix Geyer
b8dfb9cc4d
Add support for gzip compressed databases.
2010-09-23 22:27:59 +02:00
Felix Geyer
a49cf184ea
Code cleanup.
2010-09-19 16:58:21 +02:00
Felix Geyer
1678351d11
Enable and fix more warnings.
2010-09-18 20:31:14 +02:00
Felix Geyer
5da7d3fca6
Implement writing in SymmetricCipherStream and add a unit test.
2010-09-18 17:19:42 +02:00