14 lines
168 B
Go
14 lines
168 B
Go
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))
|
|
}
|