Merge branch 'develop' into feature/yubikey

This commit is contained in:
Janek Bevendorff 2017-02-15 00:24:28 +01:00
commit 37c7318097
No known key found for this signature in database
GPG key ID: CFEC2F6850BFFA53
90 changed files with 6467 additions and 1685 deletions

View file

@ -124,7 +124,7 @@ Database* KeePass2Reader::readDatabase(QIODevice* device, const CompositeKey& ke
hash.addData(m_db->transformedMasterKey());
QByteArray finalKey = hash.result();
SymmetricCipherStream cipherStream(m_device, SymmetricCipher::Aes256,
SymmetricCipherStream cipherStream(m_device, SymmetricCipher::cipherToAlgorithm(m_db->cipher()),
SymmetricCipher::Cbc, SymmetricCipher::Decrypt);
if (!cipherStream.init(finalKey, m_encryptionIV)) {
raiseError(cipherStream.errorString());
@ -336,7 +336,7 @@ void KeePass2Reader::setCipher(const QByteArray& data)
else {
Uuid uuid(data);
if (uuid != KeePass2::CIPHER_AES) {
if (uuid != KeePass2::CIPHER_AES && uuid != KeePass2::CIPHER_TWOFISH) {
raiseError("Unsupported cipher");
}
else {