2016-05-19 21:44:24 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/***********************************************************
|
|
|
|
* AuthMe website integration logic for BCrypt *
|
|
|
|
* ------------------------------------------------------- *
|
|
|
|
* See AuthMeController for details. *
|
|
|
|
* *
|
2016-07-10 11:42:40 +02:00
|
|
|
* Source: https://github.com/AuthMe/AuthMeReloaded/ *
|
2016-05-19 21:44:24 +02:00
|
|
|
***********************************************************/
|
|
|
|
class Bcrypt extends AuthMeController {
|
|
|
|
|
|
|
|
protected function hash($password) {
|
|
|
|
return password_hash($password, PASSWORD_BCRYPT);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function isValidPassword($password, $hash) {
|
|
|
|
return password_verify($password, $hash);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|