class PasswordHasher (View source)

Constants

private ALGORITHM

Properties

private int|null $cost

Methods

__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($hash)

No description

Details

__construct(Repository $config)

No description

Parameters

Repository $config

string hashPassword(string $password)

Create a hash for a plain password.

Parameters

string $password

Return Value

string

checkPassword(string $password, string $storedHash)

Check if a password corresponds to a stored hash previosly created with the hashPassword() method.

Parameters

string $password
string $storedHash

bool needsRehash($hash)

No description

Parameters

$hash

Return Value

bool