PHP Interface Pagekit\Auth\Encoder\PasswordEncoderInterface

Show file Open project: pagekit/pagekit Interface Usage Examples

Public Methods

Method Description
hash ( string $raw ) : string Encodes the raw password.
verify ( string $hash, string $raw, string $salt = null ) : boolean Checks a raw password against an encoded password.

Method Details

hash() public method

Encodes the raw password.
public hash ( string $raw ) : string
$raw string The password to hash
return string

verify() public method

Checks a raw password against an encoded password.
public verify ( string $hash, string $raw, string $salt = null ) : boolean
$hash string A hashed password
$raw string A raw password
$salt string
return boolean