Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Random Passwords #74

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

TanmayArya-1p
Copy link
Contributor

Concerned Issues:

Type of Change

  • New Feature

Implementation Detail

I have created a class PasswordGenerator in manager.py that takes in the following config options with some default settings:
config={"length": 11, "numbers": True, "symbols": True, "uppercase": True, "lowercase": True, "pronouncable_words": True}

PasswordGenerator has 2 private functions:

  1. __generate_random_password is straightforward and simply generates random characters from the allowed pool of characters as per the config
  2. __generate_pronouncable_password for this i'm using wordlist.txt which has 1127 4 letter words derived from this word list upto password_length - password_length%4 and then use __generate_random_password for the rest password_length%4

Demo

PS C:\Users\Tanma\Documents\CodingRepos\PwManager> python main.py
What would you like to do?
          1. Create a new key
          2. Load an existing key
          3. Create a new password file
          4. Load an existing password file
          5. Add a password
          6. Get a password
          q. Quit

Enter choice: 2
Enter key file path: key
Enter choice: 5
Enter site: test
Enter password (Leave Empty to generate Password): 
Enter choice: 6
Enter site: test
Password for test: bugsfelt*{>

TODO: Need to load config options for password generator once PR for settings management gets approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant