bootstrap

This commit is contained in:
微凉
2021-10-27 22:45:36 +08:00
parent 9644cc98c3
commit 55f683b12d
18 changed files with 311 additions and 133 deletions

18
utils/md5.go Normal file
View File

@ -0,0 +1,18 @@
package utils
import (
"crypto/md5"
"encoding/hex"
)
// GetMD5Encode
func GetMD5Encode(data string) string {
h := md5.New()
h.Write([]byte(data))
return hex.EncodeToString(h.Sum(nil))
}
// Get16MD5Encode
func Get16MD5Encode(data string) string {
return GetMD5Encode(data)[8:24]
}