PHP Class YiiPassword\Strategies\Hash

Inheritance: extends YiiPassword\Strategy
Mostrar archivo Open project: phpnode/yiipassword

Public Properties

Property Type Description
$hashMethod Callable The hash method to use when encoding passwords
$workFactor integer The higher the work factor the more computationally expensive it is to encode and validate passwords. So it makes your passwords harder to crack, but it can also be a burden on your own server.

Public Methods

Method Description
encode ( string $password ) : string Encode a plain text password.

Protected Methods

Method Description
generateSalt ( ) : string Generates a random salt to use when noncing passwords

Method Details

encode() public method

Child classes should implement this method and do their encoding here
public encode ( string $password ) : string
$password string the plain text password to encode
return string the encoded password

generateSalt() protected method

Generates a random salt to use when noncing passwords
protected generateSalt ( ) : string
return string the random salt

Property Details

$hashMethod public_oe property

The hash method to use when encoding passwords
public Callable $hashMethod
return Callable

$workFactor public_oe property

The higher the work factor the more computationally expensive it is to encode and validate passwords. So it makes your passwords harder to crack, but it can also be a burden on your own server.
public int $workFactor
return integer