2017 © Pedro Peláez
 

library kjbpw

Generates random passwords based on the contents of the King James Bible

image

spitzgoby/kjbpw

Generates random passwords based on the contents of the King James Bible

  • Thursday, October 8, 2015
  • by spitzgoby
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

KJB Password Generator

About

The KJB Password Generator uses words from the King James Bible to generate an xkcd style password., (*1)

Installation

Using Composer

NOTE

Versions prior to 1.0.2 will cause a stream error due to an improper path name. 1. Add spitzgoby/kjbpw to composer.json requirements section, (*2)

"require": {
     "spitzgoby/kjbpw": ">= 1.0.2"
}
  1. Run composer install

Usage

Basic

The password generator can be invoked statically using default options, (*3)

// Use password generator with default options
use KJBPasswordGenerator\PasswordGenerator as kjbpw;
$password = kjbpw::generatePassword();
echo $password;

// Sample Output: grey-ministering-shoelatchet

Options

Alternatively, an array of options can be passed to alter the generation, (*4)

// Use password generator with word count and symbol options
use KJBPasswordGenerator\PasswordGenerator as kjbpw;
$options = [kjbpw::OPTION_WORD_COUNT => 3,
            kjbpw::OPTION_USE_SYMBOL => '!'];
$password = kjbpw::generatePassword($options);
echo $password;

// Sample Output: Shelemiah-father-Sibbechai!

The $options array should be composed of valid key/value pairs as defined by the KJBPasswordGenerator\PasswordGenerator::OPTION_{option_name} constants. Any unrecognized keys or invalid values will be ignored and replaced by the defaults., (*5)

Available option keys include: * OPTION_WORD_COUNT => Default is 4
Determines the number of random words to be pulled from the King James Bible. * OPTION_USE_SYMBOL => Default is false
Can be a boolean or string value. by the default. * boolean: DEFAULT_SYMBOL (currently an @ symbol) value will be appended to the password. * string: the given string will be appended to the end of the password. * OPTION_USE_NUMBER => Default is false
Can be a boolean, integer, or string value. * boolean: A random integer between 0-9 will be appended to the password. * integer: The given integer will be appended to the password. * string: The string must contain only decimal digits. If so it will be appended to the end of the password. * OPTION_USE_HYPHENS => Default is true
Should only be a boolean value. This determines whether the randomly selected words should be separated by hyphens to improve readability and memorability., (*6)

The Versions

08/10 2015

dev-master

9999999-dev

Generates random passwords based on the contents of the King James Bible

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by Thomas Leu

07/10 2015

1.0.2

1.0.2.0

Generates random passwords based on the contents of the King James Bible

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by Thomas Leu

06/10 2015

1.0.1

1.0.1.0

Generates random passwords based on the contents of the King James Bible

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by Thomas Leu

05/10 2015

1.0.0

1.0.0.0

Generates random passwords based on the contents of the King James Bible

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

by Thomas Leu