chenjiahe
2022-01-07 be7219736d216147bd541b705ddeeb520462eaab
添加Mysql数据库的AES加解密方法(报错处理)
1个文件已修改
4 ■■■■ 已修改文件
src/main/java/com/hx/util/mysql/aes/MysqlHexAes.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/hx/util/mysql/aes/MysqlHexAes.java
@@ -45,7 +45,7 @@
            decryptCipher.init(Cipher.DECRYPT_MODE, generateMySQLAESKey(aesKey, encoding));
            data = new String(decryptCipher.doFinal(Hex.decodeHex(data.toCharArray())));
        }catch (Exception e){
            e.printStackTrace();
            throw new RuntimeException("解密失败:"+e.getMessage());
        }
        return data;
    }
@@ -71,7 +71,7 @@
            }
            data = builder.toString().toUpperCase();
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException("加密失败:"+e.getMessage());
        }
        return data;
    }