Skip to content

jms/passwordGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Password Generator

A CLI tool to generate secure passwords that exclude ambiguous characters.

Features

  • Generate multiple passwords at once.
  • Customizable password length (minimum 8 characters).
  • Excludes ambiguous characters (e.g., 0, 1, O, I, l, 5, S, q, g).

Usage

password-gen [flags]

Flags

  • -n, --num-passwords (default: 1): Number of passwords to generate.
  • -l, --length (default: 16): Length of each password.

Example

password-gen -n 3 -l 20

Implementation Details

  • Uses crypto/rand for cryptographically secure random number generation.
  • Uses github.com/spf13/cobra library to simplify development and make the code more readable
  • Character set excludes potentially confusing characters to improve readability.

Build/Development (Linux)

the executable can be built using go, or for convenience use the makefile and run make

# get the dependencies 
go mod tidy
# then 
go build -o password-gen
# or 
make

Demo

time ./password-gen -n 1000000 
...
________________________________________________________
Executed in    3.55 secs    fish           external
   usr time    2.56 secs    0.00 millis    2.56 secs
   sys time    1.32 secs    1.53 millis    1.32 secs

About

A Golang CLI tool to generate secure passwords that exclude ambiguous characters.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors