Explicitly support AES-KDF in KDBX4 and don't convert KDBX4 files with AES-KDF back to KDBX3 when saving

This commit is contained in:
Janek Bevendorff 2018-01-10 21:24:53 +01:00 committed by Jonathan White
parent d327c16904
commit b04c8c2b6e
No known key found for this signature in database
GPG key ID: 440FC65F2E0C6E01
9 changed files with 59 additions and 26 deletions

View file

@ -44,7 +44,10 @@ Database::Database()
{
m_data.cipher = KeePass2::CIPHER_AES;
m_data.compressionAlgo = CompressionGZip;
m_data.kdf = QSharedPointer<AesKdf>::create();
// instantiate default AES-KDF with legacy KDBX3 flag set
// KDBX4+ will re-initialize the KDF using parameters read from the KDBX file
m_data.kdf = QSharedPointer<AesKdf>::create(true);
m_data.kdf->randomizeSeed();
m_data.hasKey = false;