default
This commit is contained in:
13
tools/md5.go
Normal file
13
tools/md5.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package tools
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
)
|
||||
|
||||
func MD5(v string)string{
|
||||
d := []byte(v)
|
||||
m := md5.New()
|
||||
m.Write(d)
|
||||
return hex.EncodeToString(m.Sum(nil))
|
||||
}
|
Reference in New Issue
Block a user