Blame view

utils/md5.go 167 Bytes
ee23102d   zhangqijia   支持mongo, grpc接服务器
1
2
3
4
5
6
7
8
9
10
11
12
  package utils
  
  import (
  	"crypto/md5"
  	"encoding/hex"
  )
  
  func Md5V(str string) string  {
  	h := md5.New()
  	h.Write([]byte(str))
  	return hex.EncodeToString(h.Sum(nil))
  }