We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73eb350 commit cee42e3Copy full SHA for cee42e3
eladmin-common/src/main/java/me/zhengjie/utils/EncryptUtils.java
@@ -61,7 +61,7 @@ public static String desEncrypt(String source) throws Exception {
61
* 对称解密
62
*/
63
public static String desDecrypt(String source) throws Exception {
64
- byte[] src = hex2byte(source.getBytes());
+ byte[] src = hex2byte(source.getBytes(StandardCharsets.UTF_8));
65
DESKeySpec desKeySpec = getDesKeySpec(source);
66
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
67
SecretKey secretKey = keyFactory.generateSecret(desKeySpec);
0 commit comments