class BCryptPasswordEncoder extends BasePasswordEncoder
Constants
MAX_PASSWORD_LENGTH |
Methods
__construct(int $cost) Constructor. | ||
string | encodePassword(string $raw, string $salt) Encodes the raw password. | |
bool | isPasswordValid(string $encoded, string $raw, string $salt) Checks a raw password against an encoded password. |
Details
__construct(int $cost)
Constructor.
string encodePassword(string $raw, string $salt)
Encodes the raw password.
It doesn't work with PHP versions lower than 5.3.7, since the password compat library uses CRYPT_BLOWFISH hash type with the "$2y$" salt prefix (which is not available in the early PHP versions).
bool isPasswordValid(string $encoded, string $raw, string $salt)
Checks a raw password against an encoded password.
Please login to continue.