13 lines
172 B
Go
13 lines
172 B
Go
package encrypt
|
|
|
|
import (
|
|
"crypto/md5"
|
|
"encoding/hex"
|
|
)
|
|
|
|
func MD5(value string) string {
|
|
m := md5.New()
|
|
m.Write([]byte(value))
|
|
return hex.EncodeToString(m.Sum(nil))
|
|
}
|