Skip to content

Commit

Permalink
解决配置解密后中文字符串乱码问题 (#22)
Browse files Browse the repository at this point in the history
Co-authored-by: KricYi <[email protected]>
  • Loading branch information
KricYi and KricYi authored May 11, 2023
1 parent d82db0b commit 50ceaa0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 50ceaa0

Please sign in to comment.