mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-29 01:06:27 -05:00
Only use one additional thread in CompositeKey::transform().
This commit is contained in:
parent
18c7fae463
commit
f753728e97
@ -76,12 +76,12 @@ QByteArray CompositeKey::transform(const QByteArray& seed, int rounds) const
|
||||
|
||||
QByteArray key = rawKey();
|
||||
|
||||
QFuture<QByteArray> future1 = QtConcurrent::run(transformKeyRaw, key.left(16), seed, rounds);
|
||||
QFuture<QByteArray> future2 = QtConcurrent::run(transformKeyRaw, key.right(16), seed, rounds);
|
||||
QFuture<QByteArray> future = QtConcurrent::run(transformKeyRaw, key.left(16), seed, rounds);
|
||||
QByteArray result2 = transformKeyRaw(key.right(16), seed, rounds);
|
||||
|
||||
QByteArray transformed;
|
||||
transformed.append(future1.result());
|
||||
transformed.append(future2.result());
|
||||
transformed.append(future.result());
|
||||
transformed.append(result2);
|
||||
|
||||
return CryptoHash::hash(transformed, CryptoHash::Sha256);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user