mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-17 10:41:15 -04:00
Reformat code, fix minor style issues, make kdf() getter const
This commit is contained in:
parent
d1a19a1009
commit
0d6ca0945b
24 changed files with 324 additions and 473 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue