Add display number of characters in passphrases (#5449)

Co-authored-by: Jonathan White <support@dmapps.us>
This commit is contained in:
Bernhard Berg
2020-09-22 03:32:49 +02:00
committed by GitHub
parent d3747f40e2
commit ac5c1af829
2 changed files with 156 additions and 144 deletions

View File

@@ -264,6 +264,8 @@ void PasswordGeneratorWidget::updatePasswordStrength(const QString& password)
if (m_ui->tabWidget->currentIndex() == Diceware) {
// Diceware estimates entropy differently
health = PasswordHealth(m_dicewareGenerator->estimateEntropy());
m_ui->charactersInPassphraseLabel->setText(QString::number(password.length()));
}
m_ui->entropyLabel->setText(tr("Entropy: %1 bit").arg(QString::number(health.entropy(), 'f', 2)));