mirror of
https://github.com/darmiel/yaxc.git
synced 2025-09-06 14:35:57 +08:00
12 lines
174 B
Go
12 lines
174 B
Go
package common
|
|
|
|
import (
|
|
"crypto/md5"
|
|
"encoding/hex"
|
|
)
|
|
|
|
func MD5Hash(text string) string {
|
|
data := []byte(text)
|
|
sum := md5.Sum(data)
|
|
return hex.EncodeToString(sum[:])
|
|
}
|