添加袤博推送 (#284)

Co-authored-by: liuming <liuming@example.com>
This commit is contained in:
liu ming
2022-09-23 17:40:48 +08:00
committed by GitHub
parent 1a61598322
commit e000dc18aa
9 changed files with 191 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package common
import (
"Open_IM/pkg/common/config"
"crypto/md5"
"encoding/hex"
"fmt"
"io"
)
func GetSign(paramsStr string) string {
h := md5.New()
io.WriteString(h, paramsStr)
io.WriteString(h, config.Config.Push.Mob.AppSecret)
fmt.Printf("%x", h.Sum(nil))
return hex.EncodeToString(h.Sum(nil))
}