package utils import ( "crypto/md5" "encoding/hex" ) func Md5(str string) string { hash := md5.New() hash.Write([]byte(str)) bytes := hash.Sum(nil) md5Str := hex.EncodeToString(bytes) return md5Str }