PHP Class YiiPassword\Strategies\Bcrypt

Inheritance: extends YiiPassword\Strategy
Afficher le fichier Open project: phpnode/yiipassword

Méthodes publiques

Свойство Type Description
$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.

Méthodes publiques

Méthode Description
encode ( string $password ) : string Encode a plain text password.

Méthodes protégées

Méthode Description
generateSalt ( ) : string Generates a random salt.
getRandomBytes ( integer $count = 16 ) : boolean | string Gets a number of random bytes

Method Details

encode() public méthode

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

generateSalt() protected méthode

Generates a random salt.
protected generateSalt ( ) : string
Résultat string the generated salt

getRandomBytes() protected méthode

Gets a number of random bytes
protected getRandomBytes ( integer $count = 16 ) : boolean | string
$count integer the number of bytes to return
Résultat boolean | string

Property Details

$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
Résultat integer