Lightweight password hashing library.
More...
|
const | COST =10 |
| Default cost.
|
|
|
const | E_CostArg ='Invalid cost parameter' |
|
const | E_SaltArg ='Salt must be at least 22 alphanumeric characters' |
|
Lightweight password hashing library.
Bcrypt::hash |
( |
|
$pw, |
|
|
|
$salt = NULL , |
|
|
|
$cost = self::COST |
|
) |
| |
Generate bcrypt hash of string
- Returns
- string|FALSE
- Parameters
-
$pw | string |
$salt | string |
$cost | int |
Bcrypt::needs_rehash |
( |
|
$hash, |
|
|
|
$cost = self::COST |
|
) |
| |
Check if password is still strong enough
- Returns
- bool
- Parameters
-
Bcrypt::verify |
( |
|
$pw, |
|
|
|
$hash |
|
) |
| |
Verify password against hash using timing attack resistant approach
- Returns
- bool
- Parameters
-
The documentation for this class was generated from the following file: