base\Security generateSalt()

generateSalt() protected method

Generates a salt that can be used to generate a password hash.

The PHP crypt() built-in function requires, for the Blowfish hash algorithm, a salt string in a specific format: "$2a$", "$2x$" or "$2y$", a two digit cost parameter, "$", and 22 characters from the alphabet "./0-9A-Za-z".

protected string generateSalt ( $cost = 13 )
$cost integer

The cost parameter

return string

The random salt value.

throws yii\base\InvalidParamException

if the cost parameter is out of the range of 4 to 31.

doc_Yii
2016-10-30 16:52:21
Comments
Leave a Comment

Please login to continue.