PHP Class Neos\Flow\Security\Cryptography\SaltedMd5HashingStrategy

Inheritance: implements Neos\Flow\Security\Cryptography\PasswordHashingStrategyInterface
Exibir arquivo Open project: neos/flow-development-collection

Public Methods

Method Description
generateSaltedMd5 ( string $clearString ) : string Generates a salted md5 hash over the given string.
hashPassword ( string $password, string $staticSalt = null ) : string Hash a password using salted MD5
validatePassword ( string $password, string $hashedPasswordAndSalt, string $staticSalt = null ) : boolean Validate a hashed password using salted MD5
validateSaltedMd5 ( string $clearString, string $hashedStringAndSalt ) : boolean Tests if the given string would produce the same hash given the specified salt.

Method Details

generateSaltedMd5() public static method

Generates a salted md5 hash over the given string.
public static generateSaltedMd5 ( string $clearString ) : string
$clearString string The unencrypted string which is the subject to be hashed
return string Salted hash and the salt, separated by a comma ","

hashPassword() public method

Hash a password using salted MD5
public hashPassword ( string $password, string $staticSalt = null ) : string
$password string The cleartext password
$staticSalt string ignored parameter
return string A hashed password with salt

validatePassword() public method

Validate a hashed password using salted MD5
public validatePassword ( string $password, string $hashedPasswordAndSalt, string $staticSalt = null ) : boolean
$password string The cleartext password
$hashedPasswordAndSalt string The hashed password with salt
$staticSalt string ignored parameter
return boolean TRUE if the given password matches the hashed password

validateSaltedMd5() public static method

Use this method to validate hashes generated with generateSlatedMd5().
public static validateSaltedMd5 ( string $clearString, string $hashedStringAndSalt ) : boolean
$clearString string
$hashedStringAndSalt string
return boolean TRUE if the clear string matches, otherwise FALSE