PHP Class Hackzilla\PasswordGenerator\Generator\HumanPasswordGenerator

Inheritance: extends AbstractPasswordGenerator
Afficher le fichier Open project: hackzilla/password-generator Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( )
generatePassword ( ) : string Generate one password based on options.
generateWordList ( ) : string[] Generate character list for us in generating passwords.
getLength ( ) : integer Password length
getMaxPasswordLength ( ) : integer Calculate how long the password would be using maximum word length
getMaxWordLength ( ) : integer get max word length.
getMinPasswordLength ( ) : integer Calculate how long the password would be using minimum word length
getMinWordLength ( ) : integer get min word length.
getWordCount ( ) : integer Get number of words in desired password.
getWordList ( ) : string Get word list filename.
getWordSeparator ( ) : string Get word separator.
randomWord ( null | integer $minLength = null, null | integer $maxLength = null ) : string
setLength ( integer $characterCount ) Set length of desired password(s)
setMaxWordLength ( integer $length ) set max word length.
setMinWordLength ( integer $length ) set min word length.
setWordCount ( integer $characterCount ) Set number of words in desired password(s).
setWordList ( string $filename ) Set word list.
setWordSeparator ( string $separator ) Set word separator.

Private Methods

Méthode Description
findWordListLength ( )
generateWordListSubset ( $min, $max )

Method Details

__construct() public méthode

public __construct ( )

generatePassword() public méthode

Generate one password based on options.
public generatePassword ( ) : string
Résultat string password

generateWordList() public méthode

Generate character list for us in generating passwords.
public generateWordList ( ) : string[]
Résultat string[] Character list

getLength() public méthode

Password length
public getLength ( ) : integer
Résultat integer

getMaxPasswordLength() public méthode

Calculate how long the password would be using maximum word length
public getMaxPasswordLength ( ) : integer
Résultat integer

getMaxWordLength() public méthode

get max word length.
public getMaxWordLength ( ) : integer
Résultat integer

getMinPasswordLength() public méthode

Calculate how long the password would be using minimum word length
public getMinPasswordLength ( ) : integer
Résultat integer

getMinWordLength() public méthode

get min word length.
public getMinWordLength ( ) : integer
Résultat integer

getWordCount() public méthode

Get number of words in desired password.
public getWordCount ( ) : integer
Résultat integer

getWordList() public méthode

Get word list filename.
public getWordList ( ) : string
Résultat string

getWordSeparator() public méthode

Get word separator.
public getWordSeparator ( ) : string
Résultat string

randomWord() public méthode

public randomWord ( null | integer $minLength = null, null | integer $maxLength = null ) : string
$minLength null | integer
$maxLength null | integer
Résultat string

setLength() public méthode

Set length of desired password(s)
public setLength ( integer $characterCount )
$characterCount integer

setMaxWordLength() public méthode

set max word length.
public setMaxWordLength ( integer $length )
$length integer

setMinWordLength() public méthode

set min word length.
public setMinWordLength ( integer $length )
$length integer

setWordCount() public méthode

Set number of words in desired password(s).
public setWordCount ( integer $characterCount )
$characterCount integer

setWordList() public méthode

Set word list.
public setWordList ( string $filename )
$filename string

setWordSeparator() public méthode

Set word separator.
public setWordSeparator ( string $separator )
$separator string