mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-17 10:41:15 -04:00
Use quint64 everywhere for the transform rounds number.
This commit is contained in:
parent
ebce183925
commit
8122ab2b2c
8 changed files with 13 additions and 13 deletions
|
@ -113,20 +113,20 @@ void SymmetricCipherGcrypt::processInPlace(QByteArray& data)
|
|||
Q_ASSERT(error == 0);
|
||||
}
|
||||
|
||||
void SymmetricCipherGcrypt::processInPlace(QByteArray& data, int rounds)
|
||||
void SymmetricCipherGcrypt::processInPlace(QByteArray& data, quint64 rounds)
|
||||
{
|
||||
// TODO check block size
|
||||
|
||||
gcry_error_t error;
|
||||
|
||||
if (m_direction == SymmetricCipher::Decrypt) {
|
||||
for (int i = 0; i != rounds; ++i) {
|
||||
for (quint64 i = 0; i != rounds; ++i) {
|
||||
error = gcry_cipher_decrypt(m_ctx, data.data(), data.size(), 0, 0);
|
||||
Q_ASSERT(error == 0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (int i = 0; i != rounds; ++i) {
|
||||
for (quint64 i = 0; i != rounds; ++i) {
|
||||
error = gcry_cipher_encrypt(m_ctx, data.data(), data.size(), 0, 0);
|
||||
Q_ASSERT(error == 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue