package utils import ( "crypto/md5" "encoding/hex" "fmt" ) func Md5(s string) string { h := md5.New() h.Write([]byte(s)) cipherStr := h.Sum(nil) return fmt.Sprintf("%s", hex.EncodeToString(cipherStr)) }