PHP Class Webiny\Component\Security\Encoder\Drivers\Crypt

Inheritance: implements Webiny\Component\Security\Encoder\EncoderDriverInterface, use trait Webiny\Component\Crypt\CryptTrait
Show file Open project: Webiny/Framework

Public Methods

Method Description
__construct ( ) Constructor
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

__construct() public method

Constructor
public __construct ( )

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.