mergre current develop

This commit is contained in:
Marcin Łojewski
2018-12-22 19:37:05 +01:00
33 changed files with 501 additions and 91 deletions

View File

@@ -42,20 +42,22 @@ interface IPasswordAlgorithm
* This value is stored in the database, when the password is changed.
*
* @param String $password The new password.
* @param String $salt Optional. Salt value.
*
* @return boolean True if the password was hashed successfully, false otherwise.
*/
public function getPasswordHash($password);
public function getPasswordHash($password, $salt = null);
/**
* Check password given by the user against hash stored in the database.
*
* @param String $password Password given by the user.
* @param String $dbHash Password hash stored in the database.
* @param String $salt Optional. Salt value.
*
* @return boolean True if the password is correct, false otherwise.
*/
public function checkPassword($password, $dbHash);
public function checkPassword($password, $dbHash, $salt = null);
/**
* Configuration for the algorithm.