mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
update: support md5 with sha256
This commit is contained in:
parent
a365357770
commit
ec00fc4496
@ -35,6 +35,7 @@ class Kernel extends HttpKernel
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
\App\Http\Middleware\CORS::class,
|
||||
],
|
||||
|
||||
'api' => [
|
||||
|
@ -69,6 +69,7 @@ class Helper
|
||||
switch($algo) {
|
||||
case 'md5': return md5($password) === $hash;
|
||||
case 'sha256': return hash('sha256', $password) === $hash;
|
||||
case 'mws': return md5(hash('sha256', $password)) === $hash;
|
||||
default: return password_verify($password, $hash);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user