PHP Class Hackzilla\PasswordGenerator\Generator\HumanPasswordGenerator

Inheritance: extends AbstractPasswordGenerator
Mostra file Open project: hackzilla/password-generator Class Usage Examples

Public Methods

Method 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

Method Description
findWordListLength ( )
generateWordListSubset ( $min, $max )

Method Details

__construct() public method

public __construct ( )

generatePassword() public method

Generate one password based on options.
public generatePassword ( ) : string
return string password

generateWordList() public method

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

getLength() public method

Password length
public getLength ( ) : integer
return integer

getMaxPasswordLength() public method

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

getMaxWordLength() public method

get max word length.
public getMaxWordLength ( ) : integer
return integer

getMinPasswordLength() public method

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

getMinWordLength() public method

get min word length.
public getMinWordLength ( ) : integer
return integer

getWordCount() public method

Get number of words in desired password.
public getWordCount ( ) : integer
return integer

getWordList() public method

Get word list filename.
public getWordList ( ) : string
return string

getWordSeparator() public method

Get word separator.
public getWordSeparator ( ) : string
return string

randomWord() public method

public randomWord ( null | integer $minLength = null, null | integer $maxLength = null ) : string
$minLength null | integer
$maxLength null | integer
return string

setLength() public method

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

setMaxWordLength() public method

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

setMinWordLength() public method

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

setWordCount() public method

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

setWordList() public method

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

setWordSeparator() public method

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