A simple and secure command-line password generator written in Go. This tool allows users to generate random passwords with customizable options such as length, and the inclusion of uppercase letters, numbers, and special characters.
- Customizable Password Length: Easily specify the length of the password.
- Character Customization: Choose to include uppercase letters, numbers, and special characters for a stronger password.
- Secure Generation: Utilizes
crypto/rand
for cryptographically secure random number generation, ensuring high-quality randomness. - CLI Interface: Built for command-line usage, making it perfect for integration into scripts or quick generation on demand.
- Go must be installed on your system.
To get started, clone the repository and navigate into the project directory:
git clone https://github.com/anthony-leborgne/Password-generator.git
cd Password-generator
To build the executable, run:
go build -o passwordgen passwordgen.go
After building the project, you can generate passwords by running the following command in your terminal:
./passwordgen --length=16 --upper=true --numbers=true --symbols=true
This command generates a 16-character password that includes uppercase letters, numbers, and special characters.
Flag | Description | Default Value |
---|---|---|
--length |
Set the length of the password (positive integer) | 12 |
--upper |
Include uppercase letters in the password (true /false ) |
true |
--numbers |
Include numbers in the password (true /false ) |
true |
--symbols |
Include special characters in the password (true /false ) |
true |