mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-06 22:17:39 +03:00
Fix keepassxc-browser password entropy display (#3107)
* Pass correct entropy amount to keepassxc-browser instead of amount of bits for both password and passphrase. * Rename json key from "login" to "entropy" (keeping "login" key for backwards compatibility). * Also make some changes to entropy calculation methods: - Rename PassphraseGenerator::calculateEntropy to estimateEntropy - Rename PasswordGenerator::calculateEntropy to estimateEntropy
This commit is contained in:
parent
7ceca8ff3c
commit
e40f10657d
8 changed files with 25 additions and 19 deletions
|
@ -254,9 +254,9 @@ void PasswordGeneratorWidget::updatePasswordStrength(const QString& password)
|
|||
{
|
||||
double entropy = 0.0;
|
||||
if (m_ui->tabWidget->currentIndex() == Password) {
|
||||
entropy = m_passwordGenerator->calculateEntropy(password);
|
||||
entropy = m_passwordGenerator->estimateEntropy(password);
|
||||
} else {
|
||||
entropy = m_dicewareGenerator->calculateEntropy(password);
|
||||
entropy = m_dicewareGenerator->estimateEntropy();
|
||||
}
|
||||
|
||||
m_ui->entropyLabel->setText(tr("Entropy: %1 bit").arg(QString::number(entropy, 'f', 2)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue