Bcrypt
class Bcrypt extends Hasher
Bcrypt hasher.
Properties
protected array | $options | Algorithm options. | from Hasher |
Methods
array
normalizeOptions(array $options)
Normalizes the algorithm options.
int|string
getAlgorithm()
Returns the algorithm type.
bool
verify(string $password, string $hash)
Verifies that the password matches the hash.
from Hasher
bool
needsRehash(string $hash)
Returns true if the password needs rehashing and false if not.
from Hasher
Details
in Hasher at line 33
__construct(array $options = [])
Constructor.
at line 23
protected array
normalizeOptions(array $options)
Normalizes the algorithm options.
at line 38
protected int|string
getAlgorithm()
Returns the algorithm type.
in Hasher at line 59
string
create(string $password)
Creates a password hash.
in Hasher at line 74
bool
verify(string $password, string $hash)
Verifies that the password matches the hash.
in Hasher at line 82
bool
needsRehash(string $hash)
Returns true if the password needs rehashing and false if not.