From db287aac9eb5032b1158b405a9b4807301467ed3 Mon Sep 17 00:00:00 2001 From: zhouxiang <zhouxiang> Date: 星期四, 24 三月 2022 17:48:03 +0800 Subject: [PATCH] 添加redis获取整个hashKey数据和单个hashKey数据方法 --- src/main/java/com/hx/util/mysql/aes/MysqlHexAesTool.java | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/hx/util/mysql/aes/MysqlHexAesTool.java b/src/main/java/com/hx/util/mysql/aes/MysqlHexAesTool.java index 54372d2..ad8a51b 100644 --- a/src/main/java/com/hx/util/mysql/aes/MysqlHexAesTool.java +++ b/src/main/java/com/hx/util/mysql/aes/MysqlHexAesTool.java @@ -93,9 +93,14 @@ * @return true or false */ public static boolean isHexStrValid(String str) { + if(str == null){ return false; } + //鏄惁32浣嶅�嶆暟 + if(str.length()%32 != 0){ + return false; + } String pattern = "^[0-9A-F]+$"; return Pattern.compile(pattern).matcher(str).matches(); } -- Gitblit v1.8.0