add
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// SignMethod 签名方法类型
|
||||
@@ -38,7 +39,7 @@ func GenerateSign(timestamp string, appSecret string, signMethod SignMethod) (st
|
||||
}
|
||||
|
||||
// 将二进制转化为大写的十六进制(正确签名应该为32大写字符串)
|
||||
return hex.EncodeToString(hashBytes), nil
|
||||
return strings.ToUpper(hex.EncodeToString(hashBytes)), nil
|
||||
}
|
||||
|
||||
// GenerateSignWithDefault 使用默认的 HMAC-MD5 方法生成签名
|
||||
|
||||
Reference in New Issue
Block a user