interface HasherInterface

Hahser interface.

Methods

string
create(string $password)

Creates a password hash.

bool
verify(string $password, string $hash)

Verifies that the password matches the hash.

bool
needsRehash(string $hash)

Returns true if the password needs rehashing and false if not.

Details

at line 24
string create(string $password)

Creates a password hash.

Parameters

string $password Password

Return Value

string

Exceptions

HasherException

at line 33
bool verify(string $password, string $hash)

Verifies that the password matches the hash.

Parameters

string $password Password
string $hash Hash

Return Value

bool

at line 41
bool needsRehash(string $hash)

Returns true if the password needs rehashing and false if not.

Parameters

string $hash Hash

Return Value

bool