github.com/tickstep/library-go@v0.1.1/hash/hash.go (about) 1 package hash 2 3 import ( 4 "crypto/md5" 5 "encoding/hex" 6 ) 7 8 func Md5OfBytes(data []byte) string { 9 h := md5.New() 10 h.Write([]byte(data)) 11 return hex.EncodeToString(h.Sum(nil)) 12 }