13 lines
181 B
Go
13 lines
181 B
Go
package core
|
|
|
|
import (
|
|
"crypto/md5"
|
|
"encoding/hex"
|
|
)
|
|
|
|
func Md5(str string) string {
|
|
_md5 := md5.New()
|
|
_md5.Write([]byte(str))
|
|
return hex.EncodeToString(_md5.Sum([]byte("")))
|
|
}
|