印度包网
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.
 
 
 

23 lines
459 B

package base
import (
"server/util"
"strings"
"github.com/liangdas/mqant/log"
)
func (b *Base) SignMD5(send interface{}, pass ...string) string {
signStr := GetSignStr(send, pass...)
if b.KeyName == "" {
signStr += "&key=" + b.SignKey
} else {
signStr += "&" + b.KeyName + "=" + b.SignKey
}
ret := util.CalculateMD5(signStr)
if b.ShouldSignUpper {
ret = strings.ToUpper(ret)
}
log.Info("SignStr:%v,SignMD5:%v", signStr, ret)
return ret
}