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.

20 lines
230 B

package util
import (
"crypto/md5"
"encoding/hex"
)
/*
*
@author: sre
@date: 2022/8/19 0019
@desc: todo
*
*/
func Md5Encode(data string) string {
h := md5.New()
h.Write([]byte(data))
return hex.EncodeToString(h.Sum(nil))
}