2017 © Pedro Peláez
 

library password-generator

PHP library for generating easy to remember but hard to guess passwords

image

haibrini/password-generator

PHP library for generating easy to remember but hard to guess passwords

  • Sunday, October 22, 2017
  • by haibrini
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

Phrase password generator

PHP 7 ready Build Status, (*1)

PHP library for generating easy to remember, but hard to quess passwords. Inspired by xkcd comic, library generates phrases from frequently used words:, (*2)

  • English phrases (example "throat fast only idea")
  • German phrases (examle "laut welt ganze liter")
  • Russian transliterated phrases (example "kater nekiy zabrat dazhe")

Try online, (*3)

Install

Via Composer, (*4)

``` json { "require": { "haibrini/password-generator": "~0.5" } }, (*5)


## Basic usage Generate password with default length (4 words) and default separator (space). ``` php use HaiBrini\Password\Generator; // would output something like "throat fast only idea" echo Generator::generateEn(); // would output something like "laut welt ganze liter" echo Generator::generateDe(); // would output something like "kater nekiy zabrat dazhe" echo Generator::generateRuTranslit();

Each of above functions accepts length and separator paramenetrs., (*6)

``` php // would output something like "ritual-error-raise-arab-tail" echo HaiBrini\Password\Generator::generateEn(5, '-');, (*7)


## Advanced usage Call static function Generator::generate to generate passwords from wordlists. Params - *wordlists* - array of WordListInterface. If array is shorter then length, function would iterate from the beginning of array. - *lenght* - password length in words. Default - 4 - *separator* - words separator. Default - ' '(space) Example: ``` php echo Generator::generate( [ new HaiBrini\Password\WordList\En(), new HaiBrini\Password\WordList\RuTranslit() ], 5, '-' ); // would output something like "idea-dovod-critic-sever-happy"

Word lists

English

List of 2048 most frequently used English words., (*8)

Class Comment Word lenghth Example
WordList\En all words 4-6 have, that
WordList\En\Nouns nouns 4-6 time, year
WordList\En\Verbs verbs 4-6 have, would
WordList\En\Adjectives adjectives 4-8 other, good

German

List of 2048 most frequently used german words(source). Words with diacritic letters (ä, ö, ü) and eszett (ß) excluded., (*9)

Class Comment Word lenghth Example
WordList\De all words 4-6 sich, nicht

Russian Transliterated

List of 2048 transliterated most frequently used Russain words (source). "Hard" to transliterate letters (ь, ъ) excluded., (*10)

Class Comment Word lenghth Example
WordList\RuTranslit all words 4-6 chto, etot
WordList\RuTranslit\Nouns nouns 4-8 chelovek, vremya
WordList\RuTranslit\Verbs verbs 4-8 moch, skazat
WordList\RuTranslit\Adjectives adjectives 4-8 novyy, bolshoy

Security

If OpenSSL extension avaivable library would use openssl_random_pseudo_bytes for random number generation., (*11)

Testing

bash $ php vendor/bin/phpunit, (*12)

Changelog

0.5.0

  • Added option for uppercase/capitalize

Contributing

To add new language open an issue with link to frequency dictionary., (*13)

Pull requests are welcome., (*14)

Credits

All Contributors, (*15)

License

The MIT License (MIT). Please see License File for more information., (*16)

The Versions

22/10 2017

dev-master

9999999-dev https://github.com/haibrini/password-generator

PHP library for generating easy to remember but hard to guess passwords

  Sources   Download

MIT

The Development Requires

by Avatar haibrini

password

22/10 2017

v0.6.0

0.6.0.0 https://github.com/haibrini/password-generator

PHP library for generating easy to remember but hard to guess passwords

  Sources   Download

MIT

The Development Requires

by Avatar haibrini

password

22/10 2017

v0.5.2

0.5.2.0 https://github.com/haibrini/password-generator

PHP library for generating easy to remember but hard to guess passwords

  Sources   Download

MIT

The Development Requires

by Avatar haibrini

password

22/10 2017

v0.5.1

0.5.1.0 https://github.com/haibrini/password-generator

PHP library for generating easy to remember but hard to guess passwords

  Sources   Download

MIT

The Development Requires

by Haithem Elrini

password

22/10 2017

0.5.0

0.5.0.0 https://github.com/haibrini/password-generator

PHP library for generating easy to remember but hard to guess passwords

  Sources   Download

MIT

The Development Requires

by Haithem Elrini

password

28/05 2015

v0.4.0

0.4.0.0 https://github.com/denys-potapov/password-generator

PHP library for generating easy to remember but hard to guess passwords

  Sources   Download

MIT

The Development Requires

password

16/01 2015

v0.3.1

0.3.1.0 https://github.com/denys-potapov/password-generator

PHP library for generating easy to remember but hard to guess passwords

  Sources   Download

MIT

The Development Requires

password

16/01 2015

v0.3.0

0.3.0.0 https://github.com/denys-potapov/password-generator

PHP library for generating easy to remember but hard to guess passwords

  Sources   Download

MIT

The Development Requires

password

11/10 2014

v0.2.0

0.2.0.0 https://github.com/denys-potapov/password-generator

PHP library for generating easy to remember but hard to guess passwords

  Sources   Download

MIT

The Development Requires

password