PasswordHasher
class PasswordHasher (View source)
Properties
private PasswordHash | $phpassPasswordHash | ||
private string | $algorithm | The hash algorithm to use for passwords |
|
private array | $hashOptions | Options to provide when hashing and checking passwords |
Methods
string
hashPassword(string $password)
Create a hash for a plain password.
checkPassword(string $password, string $storedHash)
Check if a password corresponds to a stored hash previosly created with the hashPassword() method.
bool
needsRehash(string $hash)
Determine whether the given hash needs to be rehashed
bool
isPortable(string $storedHash)
Determine whether a given hash is a portable phpass hash
Details
__construct(Repository $config)
No description
string
hashPassword(string $password)
Create a hash for a plain password.
checkPassword(string $password, string $storedHash)
Check if a password corresponds to a stored hash previosly created with the hashPassword() method.
bool
needsRehash(string $hash)
Determine whether the given hash needs to be rehashed
private bool
isPortable(string $storedHash)
Determine whether a given hash is a portable phpass hash