1
0
mirror of synced 2025-12-15 19:47:58 +08:00

♻️ 过时语义不清晰的 decrypt 方法

This commit is contained in:
Scruel Tao
2021-12-08 14:47:49 +08:00
committed by GitHub
parent fcb599b76e
commit f2ac81ef5e
6 changed files with 8 additions and 6 deletions

View File

@@ -147,7 +147,7 @@ public class WxOpenXmlMessage implements Serializable {
public static WxOpenXmlMessage fromEncryptedXml(String encryptedXml, WxOpenConfigStorage wxOpenConfigStorage,
String timestamp, String nonce, String msgSignature) {
WxOpenCryptUtil cryptUtil = new WxOpenCryptUtil(wxOpenConfigStorage);
String plainText = cryptUtil.decrypt(msgSignature, timestamp, nonce, encryptedXml);
String plainText = cryptUtil.decryptXml(msgSignature, timestamp, nonce, encryptedXml);
log.debug("解密后的原始xml消息内容{}", plainText);
return fromXml(plainText);
}
@@ -155,7 +155,7 @@ public class WxOpenXmlMessage implements Serializable {
public static WxMpXmlMessage fromEncryptedMpXml(String encryptedXml, WxOpenConfigStorage wxOpenConfigStorage,
String timestamp, String nonce, String msgSignature) {
WxOpenCryptUtil cryptUtil = new WxOpenCryptUtil(wxOpenConfigStorage);
String plainText = cryptUtil.decrypt(msgSignature, timestamp, nonce, encryptedXml);
String plainText = cryptUtil.decryptXml(msgSignature, timestamp, nonce, encryptedXml);
return WxMpXmlMessage.fromXml(plainText);
}