Replaced words.rs with password_generator.rs#390
Replaced words.rs with password_generator.rs#3900x5A69656C wants to merge 19 commits intocortex:masterfrom
Conversation
…or some buttons I was going to implement in cursive.
|
Thanks for the pull request! I think there is a case to be made to be able to both generate passwords with normal words, and more dense entropy. Maybe this should be a selection option on the generate password dialog. |
|
I added a passphrase generator with the same word list used before and included a dialog option in cursive to use the password generator or the passphrase generator. Let me know if you have any other suggestions. |
…me for open and create in cursive
|
Made the suggested changes. |
… or 1 for less or more entropy in passwords. Also, included an option to reveal password and passphrase so you can see what your password will be before saving.
|
I added a bunch of new dialog options. Let me know if you have any nits! There is a bug currently with reveal password where if you generate a password and try to make the password secret again, you need to press the reveal button a couple times to get it to make the password secret again. Let me know if you have a fix for this. |
src/passphrase_generator.rs
Outdated
| use rand::seq::SliceRandom; | ||
|
|
||
| pub fn passphrase_generator(wordcount: i32) -> io::Result<Vec<String>> { | ||
| let filename = "share/wordlists/eff_large.wordlist"; |
There was a problem hiding this comment.
Sorry for taking a long time to review this.
I don't think this location will work, on a normal linux distribution the binary will be placed in /usr/bin/ripasso-cursive and these kind of files would go into something like /usr/share/ripasso/eff_large.wordlist.
I think the easiest solution would be to put the wordlist into the binary at compile time.
There was a problem hiding this comment.
You are correct this wouldn't work on a normal linux distribution, my mistake I am working on nix os. I also believe your solution is the simpliest, I implemented it using include_str! and brought the wordlist into src/, removing share/. Let me know if this looks good to you or not.
|
Thanks a lot for this contribution, I took the liberty of doing a rebase in #398 since I merged another pull requests. |
In this pull request I removed words.rs and it's use in the generate password button in cursive. This is because the password's generated were only 6 random all lower cased words. I replaced it with a function that creates random passwords containing all lower case letters, uppercase letters, numbers, and special characters. If you desire even more security you can change the type from 0 to 1 in password_generator() which includes the extended ASCII characters.