Handle cipher errors in TransformKeyBenchmarkThread.

This commit is contained in:
Felix Geyer 2015-05-09 23:38:04 +02:00
parent e0d4b4b625
commit 4362c3ea38
2 changed files with 8 additions and 2 deletions

View file

@ -186,7 +186,10 @@ void TransformKeyBenchmarkThread::run()
t.start();
do {
Q_UNUSED(cipher.processInPlace(key, 100));
if (!cipher.processInPlace(key, 100)) {
m_rounds = -1;
return;
}
m_rounds += 100;
} while (t.elapsed() < m_msec);
}