You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
187 B

package str
import (
"crypto/md5"
"encoding/hex"
"io"
)
func MD5(str string) string {
hasher := md5.New()
io.WriteString(hasher, str)
return hex.EncodeToString(hasher.Sum(nil))
}