You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
267 B

package utils
import (
"crypto/md5"
"encoding/hex"
)
/**
@author: sre
@date: 2022/8/10 0010
@desc: md5sum a string
**/
//Md5String that md5sum a string
func Md5String(s string) string {
h := md5.New()
h.Write([]byte(s))
return hex.EncodeToString(h.Sum(nil))
}