文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
数据加密
定义
CREATE ENCRYPT RULE encryptRuleDefinition [, encryptRuleDefinition] ...
ALTER ENCRYPT RULE encryptRuleDefinition [, encryptRuleDefinition] ...
DROP ENCRYPT RULE tableName [, tableName] ...
encryptRuleDefinition:
tableName(COLUMNS(columnDefinition [, columnDefinition] ...))
columnDefinition:
(NAME=columnName [, PLAIN=plainColumnName] , CIPHER=cipherColumnName, encryptAlgorithm)
encryptAlgorithm:
TYPE(NAME=encryptAlgorithmType [, PROPERTIES([algorithmProperties] )] )
algorithmProperties:
algorithmProperty [, algorithmProperty] ...
algorithmProperty:
key=value
PLAIN
指定明文数据列,CIPHER
指定密文数据列encryptAlgorithmType
指定加密算法类型,请参考 加密算法- 重复的
tableName
将无法被创建
示例
CREATE ENCRYPT RULE t_encrypt (
COLUMNS(
(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME=AES,PROPERTIES('aes-key-value'='123456abc'))),
(NAME=order_id, CIPHER =order_cipher,TYPE(NAME=MD5))
)),
t_encrypt_2 (
COLUMNS(
(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME=AES,PROPERTIES('aes-key-value'='123456abc'))),
(NAME=order_id, CIPHER=order_cipher,TYPE(NAME=MD5))
));
ALTER ENCRYPT RULE t_encrypt (
COLUMNS(
(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME=AES,PROPERTIES('aes-key-value'='123456abc'))),
(NAME=order_id,CIPHER=order_cipher,TYPE(NAME=MD5))
));
DROP ENCRYPT RULE t_encrypt,t_encrypt_2;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论