mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-07 19:50:33 +08:00
feat: fix bug that GetHashedPassword() reports error (#3982)
This commit is contained in:
@@ -38,6 +38,9 @@ func NewSha512SaltCredManager() *Sha512SaltCredManager {
|
||||
}
|
||||
|
||||
func (cm *Sha512SaltCredManager) GetHashedPassword(password string, salt string) string {
|
||||
if salt == "" {
|
||||
return getSha512HexDigest(password)
|
||||
}
|
||||
return getSha512HexDigest(getSha512HexDigest(password) + salt)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user