You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package utils
|
|
|
|
import (
|
|
"crypto/md5"
|
|
"encoding/hex"
|
|
)
|
|
|
|
func Md5(str string) string {
|
|
hash := md5.New()
|
|
hash.Write([]byte(str))
|
|
bytes := hash.Sum(nil)
|
|
md5Str := hex.EncodeToString(bytes)
|
|
return md5Str
|
|
}
|