CryptoUtils.go 195 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 10 11 12 13 package Crypto import ( "crypto/md5" "encoding/hex" ) //生成32位md5字串 func GetMd5String(s string) string { h := md5.New() h.Write([]byte(s)) return hex.EncodeToString(h.Sum(nil)) }