Skip to content

A simple, secure command-line password generator written in Go using the Cobra library.

Notifications You must be signed in to change notification settings

KennyMwendwaX/PassGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PassGen

A simple, secure command-line password generator written in Go using the Cobra library.

Features

  • 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

Installation

  1. Ensure you have Go installed on your system (version 1.11 or later recommended).
  2. Clone this repository:
git clone https://github.com/KennyMwendwaX/PassGen.git
  1. Navigate to the project directory:
cd PassGen
  1. Build the project:
 cd PassGen

Usage

After building the project, you can run the password generator using:

./PassGen [flags]

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)

Examples

  1. Generate a password with default settings (16 characters, letters and numbers):
./PassGen
  1. Generate a 20-character password including special characters:
./PassGen -l 20 -s
  1. Generate a password and display its entropy:
./PassGen -v

Security

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.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

A simple, secure command-line password generator written in Go using the Cobra library.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages