This is an automated email from the ASF dual-hosted git repository.

jianglongtao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 176cfce  optimize encrypt distsql doc (#13974)
176cfce is described below

commit 176cfceb3855c6c39951bb61ce4fe560c88c357e
Author: Zhengqiang Duan <[email protected]>
AuthorDate: Tue Dec 7 16:30:25 2021 +0800

    optimize encrypt distsql doc (#13974)
    
    * optimize encrypt distsql doc
    
    * optimize encrypt distsql doc
    
    * optimize encrypt distsql doc
---
 .../distsql/usage/encrypt-rule.cn.md               | 42 +++++++++++-----------
 .../distsql/usage/encrypt-rule.en.md               | 42 +++++++++++-----------
 2 files changed, 42 insertions(+), 42 deletions(-)

diff --git 
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/usage/encrypt-rule.cn.md
 
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/usage/encrypt-rule.cn.md
index b14832a..4ad66c7 100644
--- 
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/usage/encrypt-rule.cn.md
+++ 
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/usage/encrypt-rule.cn.md
@@ -7,43 +7,43 @@ weight = 3
 
 ```sql
 ADD RESOURCE ds_0 (
-HOST=127.0.0.1,
-PORT=3306,
-DB=ds_0,
-USER=root,
-PASSWORD=root
+    HOST=127.0.0.1,
+    PORT=3306,
+    DB=ds_0,
+    USER=root,
+    PASSWORD=root
 );
 ```
 
 ## 规则操作
 
-- 创建加密表
+- 创建加密规则
 
 ```sql
-CREATE TABLE `t_encrypt` (
-  `order_id` int NOT NULL,
-  `user_plain` varchar(45) DEFAULT NULL,
-  `user_cipher` varchar(45) DEFAULT NULL,
-  PRIMARY KEY (`order_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
+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,PLAIN=order_plain,CIPHER 
=order_cipher,TYPE(NAME=RC4,PROPERTIES('rc4-key-value'='123456abc')))
+));
 ```
 
-- 创建加密规则
+- 创建加密表
 
 ```sql
-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))
-));
+CREATE TABLE `t_encrypt` (
+    `id` int(11) NOT NULL,
+    `user_id` varchar(45) DEFAULT NULL,
+    `order_id` varchar(45) DEFAULT NULL,
+    PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 ```
 
 - 修改加密规则
 
 ```sql
-CREATE ENCRYPT RULE t_encrypt (
-COLUMNS(
-(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME=AES,PROPERTIES('aes-key-value'='123456abc'))),
+ALTER ENCRYPT RULE t_encrypt (
+    COLUMNS(
+        
(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME=AES,PROPERTIES('aes-key-value'='123456abc'))),
 ));
 ```
 
diff --git 
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/usage/encrypt-rule.en.md
 
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/usage/encrypt-rule.en.md
index 6b1e38c..d12e871 100644
--- 
a/docs/document/content/user-manual/shardingsphere-proxy/distsql/usage/encrypt-rule.en.md
+++ 
b/docs/document/content/user-manual/shardingsphere-proxy/distsql/usage/encrypt-rule.en.md
@@ -7,43 +7,43 @@ weight = 3
 
 ```sql
 ADD RESOURCE ds_0 (
-HOST=127.0.0.1,
-PORT=3306,
-DB=ds_0,
-USER=root,
-PASSWORD=root
+    HOST=127.0.0.1,
+    PORT=3306,
+    DB=ds_0,
+    USER=root,
+    PASSWORD=root
 );
 ```
 
 ## Rule Operation
 
-- Create encrypt table
+- Create encrypt rule
 
 ```sql
-CREATE TABLE `t_encrypt` (
-  `order_id` int NOT NULL,
-  `user_plain` varchar(45) DEFAULT NULL,
-  `user_cipher` varchar(45) DEFAULT NULL,
-  PRIMARY KEY (`order_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+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,PLAIN=order_plain,CIPHER 
=order_cipher,TYPE(NAME=RC4,PROPERTIES('rc4-key-value'='123456abc')))
+));
 ```
 
-- Create encrypt rule
+- Create encrypt table
 
 ```sql
-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))
-));
+CREATE TABLE `t_encrypt` (
+    `id` int(11) NOT NULL,
+    `user_id` varchar(45) DEFAULT NULL,
+    `order_id` varchar(45) DEFAULT NULL,
+    PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 ```
 
 - Alter encrypt rule
 
 ```sql
-CREATE ENCRYPT RULE t_encrypt (
-COLUMNS(
-(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME=AES,PROPERTIES('aes-key-value'='123456abc'))),
+ALTER ENCRYPT RULE t_encrypt (
+    COLUMNS(
+        
(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME=AES,PROPERTIES('aes-key-value'='123456abc'))),
 ));
 ```
 

Reply via email to