Zend Framework
3.0
|
Bcrypt algorithm using crypt() function of PHP with password hashed using SHA2 to allow for passwords >72 characters. More...
Public Member Functions | |
create ($password) | |
BcryptSha. | |
verify ($password, $hash) | |
Verify if a password is correct against a hash value. | |
Public Member Functions inherited from Bcrypt | |
__construct ($options=[]) | |
Constructor. | |
create ($password) | |
Bcrypt. | |
verify ($password, $hash) | |
Verify if a password is correct against a hash value. | |
setCost ($cost) | |
Set the cost parameter. | |
getCost () | |
Get the cost parameter. | |
setSalt ($salt) | |
Set the salt value. | |
getSalt () | |
Get the salt value. | |
benchmarkCost ($timeTarget=0.05) | |
Benchmark the bcrypt hash generation to determine the cost parameter based on time to target. | |
Additional Inherited Members | |
Public Attributes inherited from Bcrypt | |
const | MIN_SALT_SIZE = 22 |
Protected Attributes inherited from Bcrypt | |
$cost = '10' | |
$salt | |
Bcrypt algorithm using crypt() function of PHP with password hashed using SHA2 to allow for passwords >72 characters.
create | ( | $password | ) |
string | $password |
Exception\RuntimeException |
Implements PasswordInterface.
verify | ( | $password, | |
$hash | |||
) |
Verify if a password is correct against a hash value.
string | $password | |
string | $hash |
Exception\RuntimeException | when the hash is unable to be processed |
Implements PasswordInterface.