2017 © Pedro Peláez
 

library battery-staple

Generate XKCD inspired passwords

image

yuloh/battery-staple

Generate XKCD inspired passwords

  • Monday, November 14, 2016
  • by yuloh
  • Repository
  • 2 Watchers
  • 1 Stars
  • 49 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 7 % Grown

The README.md

Battery Staple

A password generator, inspired by XKCD., (*1)

XKCD comic, (*2)

Install

Via Composer

composer require yuloh/battery-staple

Usage

$password = Yuloh\BatteryStaple\PasswordGenerator::generate();
// returns something like "beefjapanesesealedunwrap"

Security

The library is 8 lines of code, so there isn't much that can go wrong. Here is what happens:, (*3)

  • A word list of 10,000 words is loaded.
  • A random number is generated with random_int and the word on that line is used.
  • Repeat the above until you have 4 words.

That being said, I am not a security expert. I cannot guarantee that this library is cryptographically secure and you shouldn't use it for anything important., (*4)

Contributing

Contributions Welcome. Some ideas:, (*5)

  • ~~Allow choosing a delimiter~~
  • Set min/max word length, so you don't get words like 'the'
  • Case transformation options (using neko?)

The Versions

14/11 2016

dev-master

9999999-dev

Generate XKCD inspired passwords

  Sources   Download

MIT

The Requires

 

13/11 2016

1.0

1.0.0.0

Generate XKCD inspired passwords

  Sources   Download

MIT

The Requires