aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo.monero <moneromooo.monero@users.noreply.github.com>2016-12-16 00:27:16 +0000
committermoneromooo.monero <moneromooo.monero@users.noreply.github.com>2016-12-17 12:45:00 +0000
commit03c15af20eb0df4e1e575d01cd40a7c127304bec (patch)
tree0d5f25c06dded050d0d033a0b0a9873aed65e06c
parentfbe19d23b70cb051e6089128c7eec1b82589f680 (diff)
downloadmonzero-gui-03c15af20eb0df4e1e575d01cd40a7c127304bec.tar.gz
monzero-gui-03c15af20eb0df4e1e575d01cd40a7c127304bec.tar.xz
monzero-gui-03c15af20eb0df4e1e575d01cd40a7c127304bec.zip
Don't claim a password is "medium" too easily
-rw-r--r--components/PrivacyLevelSmall.qml2
-rw-r--r--wizard/WizardPassword.qml8
2 files changed, 8 insertions, 2 deletions
diff --git a/components/PrivacyLevelSmall.qml b/components/PrivacyLevelSmall.qml
index cb1cd36e..47543f52 100644
--- a/components/PrivacyLevelSmall.qml
+++ b/components/PrivacyLevelSmall.qml
@@ -72,7 +72,7 @@ Item {
width: row.x
color: {
- if(item.fillLevel < 3) return "#FF6C3C"
+ if(item.fillLevel < 5) return "#FF6C3C"
if(item.fillLevel < 13) return "#FFE00A"
return "#36B25C"
}
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)