utils initial commit

This commit is contained in:
away
2021-05-26 19:35:56 +08:00
parent 4e621ebc69
commit f1e3912edd
10 changed files with 639 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
package utils
import (
"crypto/md5"
"encoding/hex"
)
func Md5(s string) string {
h := md5.New()
h.Write([]byte(s))
cipher := h.Sum(nil)
return hex.EncodeToString(cipher)
}