sts10 / phraze

Generate random passphrases

Home Page:https://sts10.github.io/2023/10/24/phraze-passphrase-generator.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement an easy-to-use "Secure" mode

sts10 opened this issue · comments

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.

Implemented in #11. Came out a bit different in practice, but I like it for its balance between usability and code readability.