2017 © Pedro Peláez
 

library password-generator

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

image

27cm/password-generator

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

  • Monday, September 26, 2016
  • by 27cm
  • Repository
  • 0 Watchers
  • 0 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 6 % Grown

The README.md

XKCD Phrase Password Generator

A flexible and scriptable password generator which generates strong passphrases, inspired by XKCD Comic 936. Generated passwords easy to remember, but hard to quess passwords., (*1)

XKCD Password Strength, (*2)

Installing

With Composer:, (*3)

$ composer require 27cm/password-generator

Basic usage

Library generates phrases from frequently used words:, (*4)

  • English phrases (example "throat fast only idea")
  • German phrases (examle "laut welt ganze liter")
  • Russian phrases (example "тоже металл пора подача")
  • Russian transliterated phrases (example "kater nekiy zabrat dazhe")

Generate password with default length (4 words) and default separator (space)., (*5)

use TwentySeven\Password\Generator;
use TwentySeven\Password\WordList;

echo Generator::generateEn();
// => "throat fast only idea"

echo Generator::generateDe();
// => "laut welt ganze liter"

echo Generator::generateRu();
// => "тоже металл пора подача"

echo Generator::generateRuTranslit();
// => "kater nekiy zabrat dazhe"

echo TwentySeven\Password\Generator::generateEn(5, '-');
// => "ritual-error-raise-arab-tail"

$lists = [ new WordList\En(), new WordList\RuTranslit() ];
echo Generator::generate($lists, 5, '-');
// => "idea-dovod-critic-sever-happy"

Word lists

English

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

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., (*7)

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

Russian

Lists consist of 2048 most frequently used Russain words (source)., (*8)

Class Comment Word lenghth Example
WordList\Ru all words 4-6 быть, этот
WordList\Ru\Nouns nouns 4-8 человек, время
WordList\Ru\Verbs verbs 4-8 быть, мочь
WordList\Ru\Adjectives adjectives 4-8 новый, большой

Russian Transliterated

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

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

Library uses CSPRNG for random number generation., (*10)

The Versions

26/09 2016

dev-master

9999999-dev https://github.com/27cm/password-generator

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

  Sources   Download

MIT

The Requires

 

The Development Requires

password xkcd