md5.go 153 B

1234567891011
  1. package md5
  2. import (
  3. "crypto/md5"
  4. "encoding/hex"
  5. )
  6. func Md5(str string) string {
  7. hash := md5.Sum([]byte(str))
  8. return hex.EncodeToString(hash[:])
  9. }