2016-05-15 00:08:30 +02:00
|
|
|
<?php
|
|
|
|
class Hashing {
|
|
|
|
public static function hashPassword($password) {
|
|
|
|
return password_hash($password, PASSWORD_DEFAULT);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function verifyPassword($password, $hash) {
|
|
|
|
return password_verify($password, $hash);
|
|
|
|
}
|
2016-07-14 08:34:13 +02:00
|
|
|
public static function generateRandomToken() {
|
|
|
|
return md5(uniqid(rand()));
|
|
|
|
}
|
2016-05-15 00:08:30 +02:00
|
|
|
}
|