MCPcopy Create free account
hub / github.com/LockGit/gochat / Sha1

Function Sha1

tools/commom.go:46–51  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

44}
45
46func Sha1(s string) (str string) {
47 h := sha1.New()
48 h.Write([]byte(s))
49 bs := h.Sum(nil)
50 return fmt.Sprintf("%x", bs)
51}
52
53func GetNowDateTime() string {
54 return time.Unix(time.Now().Unix(), 0).Format("2006-01-02 15:04:05")

Callers 2

LoginFunction · 0.92
RegisterFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected