Merge branch 'source'

pull/432/head
liaojinlong 2020-06-23 10:26:08 +08:00
commit 662345077e
1 changed files with 1 additions and 1 deletions

View File

@ -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);