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

@@ -71,7 +71,7 @@ QByteArray CompositeKey::rawKey() const
return cryptoHash.result();
}
QByteArray CompositeKey::transform(const QByteArray& seed, int rounds) const
QByteArray CompositeKey::transform(const QByteArray& seed, quint64 rounds) const
{
Q_ASSERT(seed.size() == 32);
Q_ASSERT(rounds > 0);
@@ -89,7 +89,7 @@ QByteArray CompositeKey::transform(const QByteArray& seed, int rounds) const
}
QByteArray CompositeKey::transformKeyRaw(const QByteArray& key, const QByteArray& seed,
int rounds) {
quint64 rounds) {
QByteArray iv(16, 0);
SymmetricCipher cipher(SymmetricCipher::Aes256, SymmetricCipher::Ecb,
SymmetricCipher::Encrypt, seed, iv);

View File

@@ -33,14 +33,14 @@ public:
CompositeKey& operator=(const CompositeKey& key);
QByteArray rawKey() const;
QByteArray transform(const QByteArray& seed, int rounds) const;
QByteArray transform(const QByteArray& seed, quint64 rounds) const;
void addKey(const Key& key);
static int transformKeyBenchmark(int msec);
private:
static QByteArray transformKeyRaw(const QByteArray& key, const QByteArray& seed,
int rounds);
quint64 rounds);
QList<Key*> m_keys;
};