gitee.com/woood2/luca@v1.0.4/internal/util/md5.go (about)

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