A simple, secure command-line password generator written in Go using the Cobra library.
- Generate passwords of customizable length (8-128 characters)
- Option to include letters, numbers, and special characters
- Secure random generation using crypto/rand
- Calculates and displays password entropy (in verbose mode)
- Easy-to-use command-line interface
- Ensure you have Go installed on your system (version 1.11 or later recommended).
- Clone this repository:
git clone https://github.com/KennyMwendwaX/PassGen.git
- Navigate to the project directory:
cd PassGen
- Build the project:
cd PassGen
After building the project, you can run the password generator using:
./PassGen [flags]
-l, --length int
: Length of the password (default 16)-t, --letters
: Include letters (default true)-n, --numbers
: Include numbers (default true)-s, --specials
: Include special characters-v, --verbose
: Verbose output (displays password entropy)
- Generate a password with default settings (16 characters, letters and numbers):
./PassGen
- Generate a 20-character password including special characters:
./PassGen -l 20 -s
- Generate a password and display its entropy:
./PassGen -v
This password generator uses Go's crypto/rand
package to ensure cryptographically secure random number generation. The generated passwords are suitable for most security purposes.
Contributions are welcome! Please feel free to submit a Pull Request.