Files
go-easy-utils/cryptox/md5.go
2025-07-08 15:26:54 +08:00

14 lines
216 B
Go

package cryptox
import (
"crypto/md5"
"encoding/hex"
)
// Md5 MD5加密
func Md5(str string) string {
h := md5.New()
h.Write([]byte(str)) // 需要加密的字符串为
return hex.EncodeToString(h.Sum(nil))
}