标签:sql int varchar into 数据 arch mysql select enc
-- 创建测试表
drop table if EXISTS t_passwd_2;
create table t_passwd_2(pass1 varchar(64));
-- 对身份证号加密
insert into t_passwd_2 values (hex(aes_encrypt(‘22230119771011001X‘, ‘dsideal4r5t6y7u!@#‘)));
-- 数据库中存储的样子
select * from t_passwd_2;
-- 解密
select aes_decrypt(unhex(pass1), ‘dsideal4r5t6y7u!@#‘) as pass1 from t_passwd_2;
标签:sql int varchar into 数据 arch mysql select enc
原文地址:https://www.cnblogs.com/littlehb/p/9042853.html