| | |
| | | package com.hx.mybatis.handler.aes; |
| | | |
| | | import com.hx.springbean.VariableAesKey; |
| | | import com.hx.util.mysql.aes.MysqlHexAes; |
| | | import org.apache.ibatis.type.BaseTypeHandler; |
| | | import org.apache.ibatis.type.JdbcType; |
| | |
| | | String data = rs.getString(columnName); |
| | | if(data != null && data.length()%32==0 && MysqlHexAes.isHexStrValid(data)){ |
| | | try{ |
| | | data = MysqlHexAes.decryptData(data,"123456",null); |
| | | data = MysqlHexAes.decryptData(data, VariableAesKey.getAesKey(columnName),null); |
| | | }catch (Exception e){ |
| | | //e.printStackTrace(); |
| | | } |