当前位置:网站首页>MySQL storage data encryption
MySQL storage data encryption
2022-07-04 22:13:00 【CodingSir】
There are two mainstream encryption methods
ENCODE And DECODE
# Build a test sheet
create table users(
username varchar(128), # The user nickname
password blob # password
) engine=innodb default charset=utf8;
# Insert a test statement
INSERT INTO users (username, password) VALUES ('john', ENCODE('guessme', 'salt'));
commit;
# Inquire about john Password ( With mysql workbench)
select t.username, DECODE(t.password,'salt') as password from users t where t.username = 'john';
# In the query structure password Value up , Right click ,'open value in viewer'. You can see text TAB Password plaintext under .
AES_ENCRYPT And AES_DECRYPT
The security level of this encryption method is better than encode high , It has been deprecated in the new version of the database encode And decode.
# The test table , Also use users
# Insert a statement
INSERT INTO users (username, password) VALUES ('steven', aes_encrypt('password', 'salt'));
commit;
# Inquire about steven Password ( With mysql workbench)
select t.username, aes_decrypt(t.password,'salt') as password from users t where t.username = 'steven';
边栏推荐
- Common open source codeless testing tools
- AscendEX 上线 Walken (WLKN) - 一款卓越领先的“Walk-to-Earn”游戏
- 玩转gRPC—深入概念与原理
- sqlserver对数据进行加密、解密
- GTEST from ignorance to proficient use (2) what is test fixture
- Convolutional neural network model -- lenet network structure and code implementation
- 能源势动:电力行业的碳中和该如何实现?
- 抖音实战~评论数量同步更新
- bizchart+slider实现分组柱状图
- 开户哪家券商比较好?网上开户安全吗
猜你喜欢
Bizchart+slider to realize grouping histogram
AscendEX 上线 Walken (WLKN) - 一款卓越领先的“Walk-to-Earn”游戏
Common open source codeless testing tools
MongoDB聚合操作总结
B站大量虚拟主播被集体强制退款:收入蒸发,还倒欠B站;乔布斯被追授美国总统自由勋章;Grafana 9 发布|极客头条
Zhiyang innovation signed a cooperation agreement with Huawei to jointly promote the sustainable development of shengteng AI industry
VS2019 C# release下断点调试
QT - plot other problems
Kdd2022 | what features are effective for interaction?
使用 BlocConsumer 同时构建响应式组件和监听状态
随机推荐
You don't have to run away to delete the library! Detailed MySQL data recovery
Energy momentum: how to achieve carbon neutralization in the power industry?
VIM from dislike to dependence (23) -- the last gossip
Acwing 2022 daily question
283. 移动零-c与语言辅助数组法
Service online governance
Relational database
NAACL-22 | 在基于Prompt的文本生成任务上引入迁移学习的设置
GTEST from ignorance to proficiency (3) what are test suite and test case
close系统调用分析-性能优化
Common shortcut keys for hbuilder x
并发网络模块化 读书笔记转
【Acwing】第58场周赛 题解
Bookmark
Tiktok actual combat ~ the number of comments is updated synchronously
PostgreSQL JOIN实践及原理
股票开户流程是什么?使用同花顺手机炒股软件安全吗?
Nat. Commun.| 机器学习对可突变的治疗性抗体的亲和力和特异性进行共同优化
MongoDB中的索引操作总结
Application practice | Shuhai supply chain construction of data center based on Apache Doris