宇恒一号官网

This commit is contained in:
whm
2026-03-17 00:59:32 +08:00
commit eb56519df7
105 changed files with 10783 additions and 0 deletions

12
server/utils/password.go Normal file
View File

@@ -0,0 +1,12 @@
package utils
import (
"crypto/sha256"
"encoding/hex"
)
// HashPassword 使用 SHA-256 哈希密码(与 Python 实现一致)
func HashPassword(password string) string {
h := sha256.Sum256([]byte(password))
return hex.EncodeToString(h[:])
}