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. |
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 "," |
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 |