This commit is contained in:
史悦
2025-08-13 19:03:20 +08:00
commit d62a2e9ed9
73 changed files with 7296 additions and 0 deletions

16
pkg/crypto/md5.go Normal file
View File

@@ -0,0 +1,16 @@
package crypto
import (
"crypto/md5"
"encoding/hex"
)
//GetMd5 生成32位md5字串
func GetMd5(s string) string {
if s == "" {
return ""
}
h := md5.New()
h.Write([]byte(s))
return hex.EncodeToString(h.Sum(nil))
}