当前位置:网站首页>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';
边栏推荐
- [optimtool.unconstrained] unconstrained optimization toolbox
- gtest从一无所知到熟练使用(3)什么是test suite和test case
- vim 从嫌弃到依赖(23)——最后的闲扯
- HDU - 2859 Phalanx(DP)
- Implementation rules for archiving assessment materials of robot related courses 2022 version
- KDD2022 | 什么特征进行交互才是有效的?
- Bookmark
- Spatiotemporal prediction 3-graph transformer
- 好用app推荐:扫描二维码、扫描条形码并查看历史
- 时空预测3-graph transformer
猜你喜欢

Play with grpc - go deep into concepts and principles

QT - plot other problems

什么是商业智能(BI),就看这篇文章足够了

Deveco device tool 3.0 release brings five capability upgrades to make intelligent device development more efficient

嵌入式开发:技巧和窍门——提高嵌入式软件代码质量的7个技巧

VS2019 C# release下断点调试

Energy momentum: how to achieve carbon neutralization in the power industry?

迷失在Mysql的锁世界

bizchart+slider实现分组柱状图

Kdd2022 | what features are effective for interaction?
随机推荐
Solve the problem of data disorder caused by slow asynchronous interface
Force buckle 2_ 1480. Dynamic sum of one-dimensional array
Tiktok actual combat ~ the number of comments is updated synchronously
How to transfer to software testing, one of the high paying jobs in the Internet? (software testing learning roadmap attached)
Use blocconsumer to build responsive components and monitor status at the same time
el-tree结合el-table,树形添加修改操作
电话加密,中间4为****代替
How is the entered query SQL statement executed?
Huawei Nova 10 series released Huawei application market to build a solid application security firewall
GTEST from ignorance to proficient use (2) what is test fixture
File read write
AscendEX 上线 Walken (WLKN) - 一款卓越领先的“Walk-to-Earn”游戏
傳智教育|如何轉行互聯網高薪崗比特之一的軟件測試?(附軟件測試學習路線圖)
机器人相关课程考核材料归档实施细则2022版本
关系型数据库
Kdd2022 | what features are effective for interaction?
Bizchart+slider to realize grouping histogram
bizchart+slider实现分组柱状图
odps 中 对表进行了一次备份,为什么在元数据库查m_table 时,两张表的逻辑大小不一致,但数
Flink1.13 SQL basic syntax (I) DDL, DML