Simple Password Generator

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

Installation

Simply install the generator with Rubygems:

$ gem install simple-password-gen

Example

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

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

Synopsis

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 <n> password(s) with appox. length <len>.
  Will fail if n is less than 1 or len is less than 5.
  Defaults: length=10, number=3

Author and Contributors

Written by Dominik Menke, dmke(at)tzi(dot)org

Some typo fixes by @tanraya (Andrew).

License

Simplified BSD License. See the file LICENSE.