Use quint64 everywhere for the transform rounds number.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user