Reformat code, fix minor style issues, make kdf() getter const

This commit is contained in:
Janek Bevendorff authored and Jonathan White committed 2018-01-13 14:23:27 -05:00
1 parent d1a19a1009
commit 0d6ca0945b
24 files changed
+324 -473

No files matched your search

+4 -7
View File
@@ -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);