"eladmin-common/vscode:/vscode.git/clone" did not exist on "776cee4b14d1ea43a9f84c840f038544c727dcca"
Commit cee42e3a authored by ZhengJie's avatar ZhengJie
Browse files

[代码优化](v2.5): EncryptUtils 优化在linux中,存在解密乱码的情况

close https://github.com/elunez/eladmin/issues/419
parent 73eb3501
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment