ringfinger/backend/classes/core/Password.php
2020-08-19 21:06:45 +02:00

16 lines
306 B
PHP

<?php
declare(strict_types=1);
class Password
{
public static function IsValid(string $password, string $hash): bool
{
return password_verify($password, $hash);
}
public static function GetHash(string $password): string
{
return password_hash($password, PASSWORD_BCRYPT);
}
}