mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-03-15 19:06:09 -04:00
Handle cipher errors in TransformKeyBenchmarkThread.
This commit is contained in:
parent
e0d4b4b625
commit
4362c3ea38
@ -130,7 +130,10 @@ void DatabaseSettingsWidget::reject()
|
||||
void DatabaseSettingsWidget::transformRoundsBenchmark()
|
||||
{
|
||||
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
|
||||
m_ui->transformRoundsSpinBox->setValue(CompositeKey::transformKeyBenchmark(1000));
|
||||
int rounds = CompositeKey::transformKeyBenchmark(1000);
|
||||
if (rounds != -1) {
|
||||
m_ui->transformRoundsSpinBox->setValue(rounds);
|
||||
}
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user