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.
Open-IM-Server/internal/push/mobpush/common/getSign.go

19 lines
311 B

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))
}