PHP Class Webiny\Component\Security\Tests\Mocks\EncoderMock

Inheritance: implements Webiny\Component\Security\Encoder\EncoderDriverInterface
Show file Open project: Webiny/Framework

Public Methods

Method Description
createPasswordHash ( string $password ) : string Create a hash for the given password.
verifyPasswordHash ( string $password, string $hash ) : boolean Verify if the $password matches the $hash.

Method Details

createPasswordHash() public method

Create a hash for the given password.
public createPasswordHash ( string $password ) : string
$password string
return string Password hash.

verifyPasswordHash() public method

Verify if the $password matches the $hash.
public verifyPasswordHash ( string $password, string $hash ) : boolean
$password string
$hash string
return boolean True if $password matches $hash. Otherwise false is returned.