mirror of
https://github.com/v2board/v2board.git
synced 2025-06-12 12:37:54 +08:00
update changepassword
This commit is contained in:
@ -75,4 +75,13 @@ class Helper
|
||||
}
|
||||
return "vmess://" . base64_encode(json_encode($config)) . "\r\n";
|
||||
}
|
||||
|
||||
public static function multiPasswordVerify($algo, $password, $hash)
|
||||
{
|
||||
switch($algo) {
|
||||
case 'md5': return md5($password) === $hash;
|
||||
case 'sha256': return hash('sha256', $password) === $hash;
|
||||
default: return password_verify($password, $hash);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user