34 'rounds' => $this->config[
'cost'],
43 parent::parseHash(
$hash );
45 $this->params[
'rounds'] = (
int)$this->params[
'rounds'];
54 public function crypt( $password ) {
55 if ( !defined(
'CRYPT_BLOWFISH' ) ) {
56 throw new MWException(
'Bcrypt is not supported.' );
63 if ( !
isset( $this->args[0] ) ) {
76 sprintf(
'$2y$%02d$%s', (
int)$this->params[
'rounds'], $this->args[0] ) );
84 $this->params[
'rounds'] = (
int)$parts[0];
85 $this->args[0] =
substr( $parts[1], 0, 22 );
86 $this->hash =
substr( $parts[1], 22 );
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
A Bcrypt-hashed password.
parseHash( $hash)
Perform any parsing necessary on the hash to see if the hash is valid and/or to perform logic for see...
getDelimiter()
Returns the delimiter for the parameters inside the hash.
getDefaultParams()
Return an ordered array of default parameters for this password hash.
Helper class for password hash types that have a delimited set of parameters inside of the hash.
Show an error when any operation involving passwords fails to run.
string $hash
String representation of the hash without the type.