PHP Class Neos\Flow\Security\Cryptography\SaltedMd5HashingStrategy

Inheritance: implements Neos\Flow\Security\Cryptography\PasswordHashingStrategyInterface
Afficher le fichier Open project: neos/flow-development-collection

Méthodes publiques

Méthode 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 méthode

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
Résultat string Salted hash and the salt, separated by a comma ","

hashPassword() public méthode

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

validatePassword() public méthode

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
Résultat boolean TRUE if the given password matches the hashed password

validateSaltedMd5() public static méthode

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