Files
mayfly-go/base/utils/crypto_utils.go
2021-06-09 16:58:57 +08:00

14 lines
173 B
Go

package utils
import (
"crypto/md5"
"encoding/hex"
)
// md5
func Md5(str string) string {
h := md5.New()
h.Write([]byte(str))
return hex.EncodeToString(h.Sum(nil))
}