From 03c15af20eb0df4e1e575d01cd40a7c127304bec Mon Sep 17 00:00:00 2001 From: "moneromooo.monero" Date: Fri, 16 Dec 2016 00:27:16 +0000 Subject: Don't claim a password is "medium" too easily --- wizard/WizardPassword.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'wizard') diff --git a/wizard/WizardPassword.qml b/wizard/WizardPassword.qml index 1e5013cf..80bd893d 100644 --- a/wizard/WizardPassword.qml +++ b/wizard/WizardPassword.qml @@ -76,8 +76,14 @@ Item { wizard.nextButton.enabled = passwordItem.password === retypePasswordItem.password - // scorePassword returns value from 1..100 + // scorePassword returns value from 0 to... lots var strength = walletManager.getPasswordStrength(passwordItem.password); + // consider anything below 10 bits as dire + strength -= 10 + if (strength < 0) + strength = 0 + // use a slight parabola to discourage short passwords + strength = strength ^ 1.2 / 3 // privacyLevel component uses 1..13 scale privacyLevel.fillLevel = Utils.mapScope(1, 100, 1, 13, strength) -- cgit v1.2.3