mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-12-03 15:22:34 -08:00
Reformat code, fix minor style issues, make kdf() getter const
This commit is contained in:
1 parent
d1a19a1009
commit
0d6ca0945b
24 files changed
+324
-473
No files matched your search
@@ -145,8 +145,7 @@ QByteArray SymmetricCipherGcrypt::process(const QByteArray& data, bool* ok)
|
||||
|
||||
if (m_direction == SymmetricCipher::Decrypt) {
|
||||
error = gcry_cipher_decrypt(m_ctx, result.data(), data.size(), data.constData(), data.size());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
error = gcry_cipher_encrypt(m_ctx, result.data(), data.size(), data.constData(), data.size());
|
||||
}
|
||||
|
||||
@@ -154,7 +153,7 @@ QByteArray SymmetricCipherGcrypt::process(const QByteArray& data, bool* ok)
|
||||
setErrorString(error);
|
||||
*ok = false;
|
||||
} else {
|
||||
*ok = true;
|
||||
*ok = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -168,8 +167,7 @@ bool SymmetricCipherGcrypt::processInPlace(QByteArray& data)
|
||||
|
||||
if (m_direction == SymmetricCipher::Decrypt) {
|
||||
error = gcry_cipher_decrypt(m_ctx, data.data(), data.size(), nullptr, 0);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
error = gcry_cipher_encrypt(m_ctx, data.data(), data.size(), nullptr, 0);
|
||||
}
|
||||
|
||||
@@ -199,8 +197,7 @@ bool SymmetricCipherGcrypt::processInPlace(QByteArray& data, quint64 rounds)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
for (quint64 i = 0; i != rounds; ++i) {
|
||||
error = gcry_cipher_encrypt(m_ctx, rawData, size, nullptr, 0);
|
||||
|
||||
|
||||
Reference in new issue
Block a user