mysql ,MD5盐值加密


insert into kq_user(user_id,user_name,password,salt_value)
    values('admin','admin','70c3fb494f99ed2a1335d581f5c6aee0','120');

=========================================


select md5(CONCAT('admin','120'))


70c3fb494f99ed2a1335d581f5c6aee0


insert into kq_user(user_id,user_name,password,salt_value)
    values('admin','admin','70c3fb494f99ed2a1335d581f5c6aee0','120');

select * from kq_user;

========================================

select md5(CONCAT('120','120'))

70c3fb494f99ed2a1335d581f5c6aee0

insert into kq_user(user_id,user_name,password,salt_value)
    values('120','120','70c3fb494f99ed2a1335d581f5c6aee0','120');

select * from kq_user;

========================================





       UPDATE 

             `kq_user` t

       SET

              t.`password` = md5(#{password}),

  t.salt_value = #{userDisplayName}
       WHERE
              t.user_id = #{userId}

你可能感兴趣的:(数据库,mybatis)