md5.go 145 B

123456789101112
  1. package otherutils
  2. import (
  3. "crypto/md5"
  4. "fmt"
  5. )
  6. func Md5(s string) string {
  7. m := md5.Sum([]byte(s))
  8. x := fmt.Sprintf("%x", m)
  9. return x
  10. }