moto/internal/organize/passport/utils.go

14 lines
223 B
Go

package passport
import (
"crypto/md5"
"encoding/hex"
"git.nobla.cn/golang/kos/util/bs"
)
func md5Hash(s string) string {
hash := md5.New()
hash.Write(bs.StringToBytes(s))
return hex.EncodeToString(hash.Sum(nil))
}