PHP Interface Neos\Flow\Security\Cryptography\PasswordHashingStrategyInterface

ファイルを表示 Open project: neos/flow-development-collection

Public Methods

Method Description
hashPassword ( string $password, string $staticSalt = null ) : string Hash a password for storage
validatePassword ( string $password, string $hashedPasswordAndSalt, string $staticSalt = null ) : boolean Validate a hashed password against a cleartext password

Method Details

hashPassword() public method

Hash a password for storage
public hashPassword ( string $password, string $staticSalt = null ) : string
$password string Cleartext password that will be hashed
$staticSalt string Optional static salt that will not be stored in the hashed password
return string The hashed password with dynamic salt (if used)

validatePassword() public method

Validate a hashed password against a cleartext password
public validatePassword ( string $password, string $hashedPasswordAndSalt, string $staticSalt = null ) : boolean
$password string
$hashedPasswordAndSalt string Hashed password with dynamic salt (if used)
$staticSalt string Optional static salt that will not be stored in the hashed password
return boolean TRUE if the given cleartext password matched the hashed password