Implement an easy-to-use "Secure" mode
sts10 opened this issue · comments
Sam Schlinkert commented
While I'm happy with the new default of 80 bits of entropy, I was thinking I could add a -S
/--secure
flag that guarantees that the outputted passphrase has 105 bits of entropy or more.
- If
-e
minimum entropy is set to lower than 105, Phraze would ignore the flag and output a passphrase with at least 105 bits of entropy. If set to greater than 105 bits, Phraze would respect that setting. - If
-w
is set such that the resulting passphrase would have less than 105 bits, Phraze would ignore the flag.
Basically, make phraze -S
an alias for phraze -e 105
.
Sam Schlinkert commented
Implemented in #11. Came out a bit different in practice, but I like it for its balance between usability and code readability.