7ecdb46de23b42fe9388bbc9a78d55d18c89f7e2.svn-base 176 B

12345678910111213
  1. package util
  2. import (
  3. "crypto/md5"
  4. "encoding/hex"
  5. )
  6. func EncodeMD5(value string) string {
  7. m := md5.New()
  8. m.Write([]byte(value))
  9. return hex.EncodeToString(m.Sum(nil))
  10. }