Skip to content
Simple Ruby-powered password generator
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Visually safe, pronounceable passwords (#7) Jun 30, 2016
.gitignore Some larger refactorings. Jun 6, 2016
Gemfile initial commit Jan 18, 2011
Gemfile.lock Visually safe, pronounceable passwords (#7) Jun 30, 2016
LICENSE initial commit Jan 18, 2011
README.rdoc Visually safe, pronounceable passwords (#7) Jun 30, 2016
Rakefile typo fix Jun 6, 2016


Simple Password Generator

This class will generate either a pronounceable or complete random password.


Simply install the generator with Rubygems:

$ gem install simple-password-gen


You may require this file and generate some passwords, like:

require 'simple-password-gen'
puts Password.pronounceable # => "nduslihefrash"
puts Password.pronounceable(3) # => "ndu"
puts Password.pronounceable(5, visually_safe: true) # => "ukaje"
puts Password.random(4)     # => "w'ds"
pw = (1..10)   # => #<Password:0x9678514 ...>
pw.pronounceable            # => "t"
pw.pronounceable            # => "vostyhish"
pw.random                   # => "8+a"


Alternatively, you may simply run this file as command line application:

$ simple-password-gen -h
simple-password-gen [--length/-l LEN] [--number/-n NUM]
  Generates <NUM> password(s) with appox. length <LEN>.
  Will fail if NUM is less than 1 or LEN is less than 5.
  Defaults: LEN=10, NUM=3

Author and Contributors

Written by Dominik Menke, dominik(dot)menke(at)gmail(dot)com

Some typo fixes by @tanraya (Andrew).


Simplified BSD License. See the file LICENSE.

You can’t perform that action at this time.