mirror of
https://github.com/wonli/aqi.git
synced 2025-09-26 20:51:23 +08:00
13 lines
164 B
Go
13 lines
164 B
Go
package encrypt
|
|
|
|
import (
|
|
"crypto/md5"
|
|
"encoding/hex"
|
|
)
|
|
|
|
func MD5(v string) string {
|
|
m := md5.New()
|
|
m.Write([]byte(v))
|
|
return hex.EncodeToString(m.Sum(nil))
|
|
}
|