ringfinger/backend/classes/core/Password.php

16 lines
288 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);
}
}