17 lines
321 B
PHP
17 lines
321 B
PHP
<?php
|
|
|
|
namespace App\Support;
|
|
|
|
class PasswordHasher
|
|
{
|
|
public static function make(string $password): string
|
|
{
|
|
return password_hash($password, PASSWORD_ARGON2ID);
|
|
}
|
|
|
|
public static function verify(string $password, string $hash): bool
|
|
{
|
|
return password_verify($password, $hash);
|
|
}
|
|
}
|