| 1 | <?php |
||
| 9 | class PasswordHashService |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * This function takes a password as argument, salts it and returns the new password. |
||
| 13 | * |
||
| 14 | * @param string $password |
||
| 15 | * |
||
| 16 | * @return string |
||
| 17 | */ |
||
| 18 | public function hash($password) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * This function checks if a password is in md5 format. |
||
| 34 | * |
||
| 35 | * @param string $md5 |
||
| 36 | * |
||
| 37 | * @return int |
||
| 38 | */ |
||
| 39 | protected function isValidMd5($md5 = '') |
||
| 43 | } |