update: encryption
This commit is contained in:
parent
95ddba2332
commit
d22659ff04
@ -46,8 +46,6 @@ func MultiPasswordVerify(algo, salt, password, hash string) bool {
|
||||
case "md5salt":
|
||||
sum := md5.Sum([]byte(password + salt))
|
||||
return hex.EncodeToString(sum[:]) == hash
|
||||
case "default": // PPanel's default algorithm
|
||||
return VerifyPassWord(password, hash)
|
||||
case "bcrypt":
|
||||
// Bcrypt (corresponding to PHP's password_hash/password_verify)
|
||||
err := bcrypt.CompareHashAndPassword([]byte(hash), []byte(password))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user