common.go 194 Bytes Edit 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 package common import ( "crypto/md5" "encoding/hex" ) // Md5 md5() func Md5(str string) string { hash := md5.New() hash.Write([]byte(str)) return hex.EncodeToString(hash.Sum(nil)) }