From be7219736d216147bd541b705ddeeb520462eaab Mon Sep 17 00:00:00 2001
From: chenjiahe <763432473@qq.com>
Date: 星期五, 07 一月 2022 11:45:58 +0800
Subject: [PATCH] 添加Mysql数据库的AES加解密方法(报错处理)

---
 src/main/java/com/hx/util/mysql/aes/MysqlHexAes.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/hx/util/mysql/aes/MysqlHexAes.java b/src/main/java/com/hx/util/mysql/aes/MysqlHexAes.java
index 5e7a1d8..7ab145b 100644
--- a/src/main/java/com/hx/util/mysql/aes/MysqlHexAes.java
+++ b/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瘑澶辫触锛�"+e.getMessage());
         }
         return data;
     }
@@ -71,7 +71,7 @@
             }
             data = builder.toString().toUpperCase();
         } catch (Exception e) {
-            e.printStackTrace();
+            throw new RuntimeException("鍔犲瘑澶辫触锛�"+e.getMessage());
         }
         return data;
     }

--
Gitblit v1.8.0