From 64de518d4cf13875748c512892a5871ff4831b3a Mon Sep 17 00:00:00 2001 From: chenbowen Date: Wed, 7 Jan 2026 15:49:10 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=96=B0=E5=A2=9E=E7=AD=BE=E5=90=8D=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/common/util/security/CryptoSignatureUtils.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zt-framework/zt-common/src/main/java/com/zt/plat/framework/common/util/security/CryptoSignatureUtils.java b/zt-framework/zt-common/src/main/java/com/zt/plat/framework/common/util/security/CryptoSignatureUtils.java index b0d9be83..af7fa66a 100644 --- a/zt-framework/zt-common/src/main/java/com/zt/plat/framework/common/util/security/CryptoSignatureUtils.java +++ b/zt-framework/zt-common/src/main/java/com/zt/plat/framework/common/util/security/CryptoSignatureUtils.java @@ -2,6 +2,7 @@ package com.zt.plat.framework.common.util.security; import cn.hutool.crypto.SecureUtil; import com.zt.plat.framework.common.util.json.JsonUtils; +import lombok.extern.slf4j.Slf4j; import javax.crypto.Cipher; import javax.crypto.KeyGenerator; @@ -15,6 +16,7 @@ import java.util.*; /** * 通用的签名、加解密工具类 */ +@Slf4j public final class CryptoSignatureUtils { public static final String ENCRYPT_TYPE_AES = "AES"; @@ -142,6 +144,7 @@ public final class CryptoSignatureUtils { return false; } String computed; + log.info("原始签名串:{}", sb); if (SIGNATURE_TYPE_MD5.equalsIgnoreCase(type)) { computed = SecureUtil.md5(sb.toString()); } else if (SIGNATURE_TYPE_SHA256.equalsIgnoreCase(type)) { @@ -149,6 +152,8 @@ public final class CryptoSignatureUtils { } else { throw new IllegalArgumentException("Unsupported signature type: " + type); } + log.info("原始签名:{}", computed); + log.info("请求签名:{}", provided); return provided.equalsIgnoreCase(computed); }