1
0
forked from metin2/web

Added authentication

This commit is contained in:
2023-07-28 19:57:16 +03:00
parent 67af4ef427
commit c26d8e4642
11 changed files with 181 additions and 103 deletions

View File

@ -0,0 +1,24 @@
<?php
namespace App\Hashing;
use Illuminate\Contracts\Hashing\Hasher;
use Illuminate\Hashing\AbstractHasher;
class MySQLHasher extends AbstractHasher implements Hasher
{
public function make($value, array $options = []): string
{
return '*' . mb_strtoupper(sha1(sha1($value, true)));
}
public function check($value, $hashedValue, array $options = []): bool
{
return $this->make($value) === $hashedValue;
}
public function needsRehash($hashedValue, array $options = []): bool
{
return false;
}
}