TDoG-Skin/app/Services/Cipher/PHP_PASSWORD_HASH.php

17 lines
333 B
PHP
Raw Permalink Normal View History

2024-08-17 18:43:48 +08:00
<?php
namespace App\Services\Cipher;
class PHP_PASSWORD_HASH extends BaseCipher
{
public function hash($value, $salt = ''): string
{
return password_hash($value, PASSWORD_DEFAULT);
}
public function verify($password, $hash, $salt = ''): bool
{
return password_verify($password, $hash);
}
}