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
434 B
23 lines
434 B
package base |
|
|
|
import ( |
|
"server/util" |
|
"strings" |
|
|
|
"github.com/liangdas/mqant/log" |
|
) |
|
|
|
func (b *Base) SignMD5(send interface{}) string { |
|
signStr := GetSignStr(send) |
|
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 |
|
}
|
|
|