兼容老的验签

This commit is contained in:
shuo.wang
2025-08-08 15:00:11 +08:00
parent 88c34c5cf0
commit 734da0c92b
4 changed files with 59 additions and 37 deletions

View File

@@ -50,9 +50,10 @@ public class OpenSignatureUtil {
log.info("待签名字符串:{}", sb);
// 4. 生成签名
return hmacSha256(sb.toString(), appSecret);
}
public static String generateSignOld(Map<String, String> params, String appSecret) {
public static String generateOldSign(Map<String, String> params, String appSecret) {
// 1. 分离固定参数和业务参数
String appKey = params.get("appKey");
String timestamp = params.get("timestamp");