Use quint64 everywhere for the transform rounds number.

This commit is contained in:
Felix Geyer 2012-05-08 22:31:09 +02:00
parent ebce183925
commit 8122ab2b2c
8 changed files with 13 additions and 13 deletions

View file

@ -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);
}