当前位置:网站首页>GBase 8s V8.8 SQL 指南:教程-5.3.1
GBase 8s V8.8 SQL 指南:教程-5.3.1
2022-04-22 05:24:00 【GBASE数据库】
5.3.1 使用列级别数据加密来保护信用卡数据
下列示例使用列级别加密来保护信用卡数据。
使用列级别加密来保护信用卡数据:
1. 创建表:create table customer (id char(30), creditcard lvarchar(67));
2. 插入加密数据:
a. 设置会话密码:SET ENCRYPTION PASSWORD "credit card number is encrypted";
b. 加密数据。
INSERT INTO customer VALUES
("Alice", encrypt_aes("1234567890123456"));
INSERT INTO customer VALUES
("Bob", encrypt_aes("2345678901234567"));
3. 使用解密函数查询加密数据。
SET ENCRYPTION PASSWORD "credit card number is encrypted";
SELECT id FROM customer
WHERE DECRYPT_CHAR(creditcard) = "2345678901234567";
重要: 加密数据值比相应的未加密数据占用更多的存储空间。列宽足够存储明文的列可能需要
增大宽度才能支持列级别加密或单元级别加密。如果要将加密值插入声明宽度小于加密字符串
的列,那么列存储截断后的值,该值无法被解密。
有关加密安全性的更多信息,请参阅《GBase 8s 管理员指南》。
有关内置加密和解密函数语法和存储要求的更多信息,请参阅《GBase 8s SQL 指南:语法》。
版权声明
本文为[GBASE数据库]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_47390342/article/details/124326111
边栏推荐
- Leetcode 1387. Sort integers by the power value
- Reduce the graduation time to before the age of 20, and go to primary school for five years at the age of 5, so as to increase the population
- Empty object mode (3.14-3.20)
- The code example of writing data into disk file is as follows:
- Apache poi HSSF operation Excel
- 数据库第十三次作业 事务管理
- 2022-4-20 operation
- [Qualcomm sdm660 platform] (8) -- Introduction to camera metadata
- abcabc
- unity接入ILRuntime之后 热更工程应用Packages下面的包方法 例如Unity.RenderPipelines.Core.Runtime包
猜你喜欢
![[WPF] data template selector](/img/6c/ae815d0399a9ae93edd815539b44e1.png)
[WPF] data template selector

【Redis笔记】数据结构和对象:字典

用minscript脚本语言实现数学函数曲线编辑器

【WPF】VisualStateManager

Basic configuration of NP and OSPF

How to dynamically load parameters, pictures and background pictures for RDLC printing reports of ReportViewer

数据库(二)MySQL表的增删改查(基础)

Unity built-in terrain optimization

【WPF】UpdateSourceTrigger

Onzième emploi dans la base de données MySQL - application de la vue
随机推荐
Supporting early and scalable discovery of information websites
Pyqt5+Yolov5+Mss实现一个实时桌面检测软件
有限单元法基本原理和数值方法_有限元法基本原理
Vs2019 official free print control
Access denied for user 'root' @ '% MySQL problem (solved)
Complexité temporelle et spatiale
Topology optimization of heat transfer based on finite volume method
Leetcode 1561. Maximum number of coins you can get
[Qualcomm sdm660 platform] (8) -- Introduction to camera metadata
My creation anniversary
Talk about anti reverse connection circuit in combination with practice (summary of anti reverse connection circuit)
Keil-C51 与 Keil -ARM 共存的方法
Command mode (3.21-3.27)
13.9.1-PointersOnC-20220421
Generic types in classes and generic types
Mysql database for the 11th time
MySQL数据库第十一次
Unity creates dynamic classes through reflection
Go language crawler Foundation
Unity limits the rotation angle