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/mybatis/aes/handler/GenericStringHandler.java | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/hx/mybatis/aes/handler/GenericStringHandler.java b/src/main/java/com/hx/mybatis/aes/handler/GenericStringHandler.java index b31fbf1..2598bdf 100644 --- a/src/main/java/com/hx/mybatis/aes/handler/GenericStringHandler.java +++ b/src/main/java/com/hx/mybatis/aes/handler/GenericStringHandler.java @@ -1,7 +1,7 @@ package com.hx.mybatis.aes.handler; import com.hx.mybatis.aes.springbean.VariableAesKey; -import com.hx.util.mysql.aes.MysqlHexAes; +import com.hx.util.mysql.aes.MysqlHexAesTool; import org.apache.ibatis.type.BaseTypeHandler; import org.apache.ibatis.type.JdbcType; import org.apache.ibatis.type.MappedJdbcTypes; @@ -32,9 +32,9 @@ @Override public String getNullableResult(ResultSet rs, String columnName) throws SQLException { String data = rs.getString(columnName); - if(data != null && data.length()%32==0 && MysqlHexAes.isHexStrValid(data)){ + if(data != null && data.length()%32==0 && MysqlHexAesTool.isHexStrValid(data)){ try{ - data = MysqlHexAes.decryptData(data, VariableAesKey.getAesKey(columnName),null); + data = MysqlHexAesTool.decryptData(data, VariableAesKey.getAesKey(columnName),null); }catch (Exception e){ //e.printStackTrace(); } @@ -45,9 +45,9 @@ @Override public String getNullableResult(ResultSet rs, int columnIndex) throws SQLException { String data = rs.getString(columnIndex); - if(data != null && data.length()%32==0 && MysqlHexAes.isHexStrValid(data)){ + if(data != null && data.length()%32==0 && MysqlHexAesTool.isHexStrValid(data)){ try{ - data = MysqlHexAes.decryptData(data, VariableAesKey.getAesKey(null),null); + data = MysqlHexAesTool.decryptData(data, VariableAesKey.getAesKey(null),null); }catch (Exception e){ //e.printStackTrace(); } @@ -58,9 +58,9 @@ @Override public String getNullableResult(CallableStatement cs, int columnIndex) throws SQLException { String data = cs.getString(columnIndex); - if(data != null && data.length() < 129 && data.length()%32==0 && MysqlHexAes.isHexStrValid(data)){ + if(data != null && data.length() < 129 && data.length()%32==0 && MysqlHexAesTool.isHexStrValid(data)){ try{ - data = MysqlHexAes.decryptData(data, VariableAesKey.getAesKey(null),null); + data = MysqlHexAesTool.decryptData(data, VariableAesKey.getAesKey(null),null); }catch (Exception e){ //e.printStackTrace(); } -- Gitblit v1.8.0