PHP Класс YiiPassword\Strategies\Bcrypt

Наследование: extends YiiPassword\Strategy
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
encode ( string $password ) : string Encode a plain text password.

Защищенные методы

Метод Описание
generateSalt ( ) : string Generates a random salt.
getRandomBytes ( integer $count = 16 ) : boolean | string Gets a number of random bytes

Описание методов

encode() публичный Метод

Child classes should implement this method and do their encoding here
public encode ( string $password ) : string
$password string the plain text password to encode
Результат string the encoded password

generateSalt() защищенный Метод

Generates a random salt.
protected generateSalt ( ) : string
Результат string the generated salt

getRandomBytes() защищенный Метод

Gets a number of random bytes
protected getRandomBytes ( integer $count = 16 ) : boolean | string
$count integer the number of bytes to return
Результат boolean | string

Описание свойств

$workFactor публичное свойство

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
Результат integer