init
This commit is contained in:
12
core/md5.go
Normal file
12
core/md5.go
Normal file
@@ -0,0 +1,12 @@
|
||||
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("")))
|
||||
}
|
||||
Reference in New Issue
Block a user