This is a versatile password generator offering both a simple command-line interface and a user-friendly graphical user interface (GUI) for creating random, secure passwords. The latest release also includes a feature to hash passwords using the SHA-256 algorithm.
- Python 3.x
-
Clone the repository:
git clone https://github.com/yourusername/password-generator.git
-
Navigate to the project directory:
cd password-generator
-
Install dependencies:
pip install -r requirements.txt
python src/main.py
This command generates a password with a default length of 10 characters, comprising a mix of uppercase letters, lowercase letters, digits, and special characters.
python src/main.py <length>
Replace <length>
with the desired password length (minimum 1 character).
python src/main.py [OPTIONS]
Use the following options to customize the password composition:
-u
or--uppercase
: Include uppercase letters-l
or--lowercase
: Include lowercase letters-d
or--digits
: Include digits-s
or--special
: Include special characters
You can combine these options to create passwords with specific requirements. For example:
python src/main.py -l 16 -u -d
This command generates a password of length 16 containing lowercase letters, uppercase letters, and digits.
- Run the GUI application by executing
python gui.py
in your terminal. - Navigate between tabs for different functionalities:
- Generate Password: Enter the desired password length and select the character types you want to include using the checkboxes (uppercase, lowercase, digits, special characters). Click the "Generate" button to create a random password based on your selections. The generated password will be displayed in the password entry field.
- Hash Password: Enter the password you want to hash in the designated entry field. Click the "Hash Password" button to generate the SHA-256 hash of the entered password. The hashed password will be displayed in the hash result entry field.
- Generate random passwords of specified length (minimum 1 character).
- Customize password complexity by including or excluding uppercase letters, lowercase letters, digits, and special characters (both in GUI and command-line).
- Hash passwords using SHA-256 algorithm.
- Simple and intuitive command-line interface.
- User-friendly graphical user interface for easy interaction.
- Python 3.x
argparse
library (included in therequirements.txt
file)tkinter
library (included in therequirements.txt
file)
pip install -r requirements.txt
password_generator/
โ
โโโ src/
โ โโโ __init__.py
โ โโโ main.py
โ โโโ generator.py
โ
โโโ tests/
โ โโโ __init__.py
โ โโโ test_generator.py
โ
โโโ gui.py # GUI application file
โโโ README.md
โโโ requirements.txt
This project is licensed under the MIT License - see the LICENSE
file for details.
Abahazem