From cee42e3a67458a8b2002ff9bd3e47e57ad158d3c Mon Sep 17 00:00:00 2001 From: ZhengJie <201507802@qq.com> Date: Mon, 22 Jun 2020 21:17:17 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96](v2.5):?= =?UTF-8?q?=20EncryptUtils=20=E4=BC=98=E5=8C=96=E5=9C=A8linux=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E5=AD=98=E5=9C=A8=E8=A7=A3=E5=AF=86=E4=B9=B1=E7=A0=81?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close https://github.com/elunez/eladmin/issues/419 --- .../src/main/java/me/zhengjie/utils/EncryptUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java b/eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java index 01185a8d..4f334aac 100644 --- a/eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java +++ b/eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java @@ -61,7 +61,7 @@ public class EncryptUtils { * 对称解密 */ public static String desDecrypt(String source) throws Exception { - byte[] src = hex2byte(source.getBytes()); + byte[] src = hex2byte(source.getBytes(StandardCharsets.UTF_8)); DESKeySpec desKeySpec = getDesKeySpec(source); SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES"); SecretKey secretKey = keyFactory.generateSecret(desKeySpec);