AuthMeReloaded/samples/website_integration/Bcrypt.php
ljacqu 383820cd22 #702 Implement SHA256 php registration
- Refactor Bcrypt and Sha256 examples to use common abstract parent class
- Implement hashing logic for Sha256
2016-05-19 21:44:43 +02:00

21 lines
700 B
PHP

<?php
/***********************************************************
* AuthMe website integration logic for BCrypt *
* ------------------------------------------------------- *
* See AuthMeController for details. *
* *
* Source: https://github.com/AuthMe-Team/AuthMeReloaded/ *
***********************************************************/
class Bcrypt extends AuthMeController {
protected function hash($password) {
return password_hash($password, PASSWORD_BCRYPT);
}
protected function isValidPassword($password, $hash) {
return password_verify($password, $hash);
}
}