From 50ceaa01a9072f580010c49f218077697ba4b034 Mon Sep 17 00:00:00 2001 From: KricYi <30498392+KricYi@users.noreply.github.com> Date: Thu, 11 May 2023 16:02:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=85=8D=E7=BD=AE=E8=A7=A3?= =?UTF-8?q?=E5=AF=86=E5=90=8E=E4=B8=AD=E6=96=87=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E4=B9=B1=E7=A0=81=E9=97=AE=E9=A2=98=20(#22)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: KricYi --- .../nacos/plugin/encryption/AesEncryptionPluginService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nacos-encryption-plugin-ext/nacos-aes-encryption-plugin/src/main/java/com/alibaba/nacos/plugin/encryption/AesEncryptionPluginService.java b/nacos-encryption-plugin-ext/nacos-aes-encryption-plugin/src/main/java/com/alibaba/nacos/plugin/encryption/AesEncryptionPluginService.java index 917d005..50b9d5b 100644 --- a/nacos-encryption-plugin-ext/nacos-aes-encryption-plugin/src/main/java/com/alibaba/nacos/plugin/encryption/AesEncryptionPluginService.java +++ b/nacos-encryption-plugin-ext/nacos-aes-encryption-plugin/src/main/java/com/alibaba/nacos/plugin/encryption/AesEncryptionPluginService.java @@ -81,7 +81,7 @@ public String decrypt(String secretKey, String content) { Cipher cipher = Cipher.getInstance(AES_MODE); cipher.init(Cipher.DECRYPT_MODE, key, generateIv(secretKey)); byte[] result = cipher.doFinal(Hex.decodeHex(content.toCharArray())); - return new String(result); + return new String(result, StandardCharsets.UTF_8); } catch (Exception e) { LOGGER.error("[AesEncryptionPluginService] decrypt error", e); }