|
|
@@ -36,7 +36,7 @@ public class WxAPIV3AesUtil {
|
|
|
cipher.init(Cipher.DECRYPT_MODE, key, spec);
|
|
|
cipher.updateAAD(associatedData);
|
|
|
|
|
|
- return new String(cipher.doFinal(Base64.getDecoder().decode(ciphertext)), "utf-8");
|
|
|
+ return new String(cipher.doFinal(Base64.getDecoder().decode(ciphertext.replace("\r\n", ""))), "utf-8");
|
|
|
} catch (NoSuchAlgorithmException | NoSuchPaddingException e) {
|
|
|
throw new IllegalStateException(e);
|
|
|
} catch (InvalidKeyException | InvalidAlgorithmParameterException e) {
|