You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ch...@apache.org on 2023/05/09 03:21:08 UTC

[shardingsphere] branch master updated: Update assisted query document

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

chengzhang 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 06ad55c4c4c Update assisted query document
     new 4429a2f5857 Merge pull request #25531 from strongduanmu/dev
06ad55c4c4c is described below

commit 06ad55c4c4c2ea116aeec0185c45869a5f0c0966
Author: duanzhengqiang <du...@apache.org>
AuthorDate: Tue May 9 11:16:13 2023 +0800

    Update assisted query document
---
 docs/document/content/dev-manual/encrypt.cn.md     | 16 ++++++++--------
 docs/document/content/dev-manual/encrypt.en.md     |  6 +++---
 .../common-config/builtin-algorithm/encrypt.cn.md  | 22 ++++++++++++----------
 .../common-config/builtin-algorithm/encrypt.en.md  | 22 ++++++++++++----------
 .../yaml-config/rules/encrypt.cn.md                | 12 ++++--------
 .../yaml-config/rules/encrypt.en.md                | 12 ++++--------
 .../yaml-config/rules/mix.cn.md                    |  6 +++---
 .../yaml-config/rules/mix.en.md                    |  6 +++---
 8 files changed, 49 insertions(+), 53 deletions(-)

diff --git a/docs/document/content/dev-manual/encrypt.cn.md b/docs/document/content/dev-manual/encrypt.cn.md
index f8060033b7e..50ba702edb5 100644
--- a/docs/document/content/dev-manual/encrypt.cn.md
+++ b/docs/document/content/dev-manual/encrypt.cn.md
@@ -17,11 +17,11 @@ chapter = true
 
 ### 已知实现
 
-| *配置标识*           | *详细说明*         | *全限定类名*                                                                                                                                                                                                                                                            |
-|------------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| MD5              | 基于 MD5 的数据加密算法 | [`org.apache.shardingsphere.encrypt.algorithm.encrypt.MD5EncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/encrypt/MD5EncryptAlgorithm.java)                 |
-| AES              | 基于 AES 的数据加密算法 | [`org.apache.shardingsphere.encrypt.algorithm.encrypt.AESEncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/encrypt/AESEncryptAlgorithm.java)                 |
-| RC4              | 基于 RC4 的数据加密算法 | [`org.apache.shardingsphere.encrypt.algorithm.encrypt.RC4EncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/encrypt/RC4EncryptAlgorithm.java)                 |
-| SM3              | 基于 SM3 的数据加密算法 | [`org.apache.shardingsphere.encrypt.sm.algorithm.SM3EncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/plugin/sm/src/main/java/org/apache/shardingsphere/encrypt/sm/algorithm/SM3EncryptAlgorithm.java)                      |
-| SM4              | 基于 SM4 的数据加密算法 | [`org.apache.shardingsphere.encrypt.sm.algorithm.SM4EncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/plugin/sm/src/main/java/org/apache/shardingsphere/encrypt/sm/algorithm/SM4EncryptAlgorithm.java)                      |
-| CHAR_DIGEST_LIKE | 用于模糊查询的数据加密算法  | [`org.apache.shardingsphere.encrypt.algorithm.like.CharDigestLikeEncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/like/CharDigestLikeEncryptAlgorithm.java) |
+| *配置标识*           | *详细说明*             | *全限定类名*                                                                                                                                                                                                                                                            |
+|------------------|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| AES              | 基于 AES 的数据加密算法     | [`org.apache.shardingsphere.encrypt.algorithm.encrypt.AESEncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/standard/AESEncryptAlgorithm.java)                 |
+| RC4              | 基于 RC4 的数据加密算法     | [`org.apache.shardingsphere.encrypt.algorithm.encrypt.RC4EncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/standard/RC4EncryptAlgorithm.java)                 |
+| SM3              | 基于 SM3 的数据加密算法     | [`org.apache.shardingsphere.encrypt.sm.algorithm.SM3EncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/plugin/sm/src/main/java/org/apache/shardingsphere/encrypt/sm/algorithm/SM3EncryptAlgorithm.java)                      |
+| SM4              | 基于 SM4 的数据加密算法     | [`org.apache.shardingsphere.encrypt.sm.algorithm.SM4EncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/plugin/sm/src/main/java/org/apache/shardingsphere/encrypt/sm/algorithm/SM4EncryptAlgorithm.java)                      |
+| CHAR_DIGEST_LIKE | 用于模糊查询的数据加密算法      | [`org.apache.shardingsphere.encrypt.algorithm.like.CharDigestLikeEncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/like/CharDigestLikeEncryptAlgorithm.java) |
+| MD5              | 基于 MD5 的辅助查询加密算法 | [`org.apache.shardingsphere.encrypt.algorithm.encrypt.MD5EncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/assisted/MD5AssistedEncryptAlgorithm.java)                 |
diff --git a/docs/document/content/dev-manual/encrypt.en.md b/docs/document/content/dev-manual/encrypt.en.md
index 25a8cad37f4..3b439bb2474 100644
--- a/docs/document/content/dev-manual/encrypt.en.md
+++ b/docs/document/content/dev-manual/encrypt.en.md
@@ -19,9 +19,9 @@ Data encrypt algorithm definition
 
 | *Configuration Type* | *Description*                               | *Fully-qualified class name*                                                                                                                                                                                                                                       |
 |----------------------|---------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| MD5                  | MD5 data encrypt algorithm                  | [`org.apache.shardingsphere.encrypt.algorithm.encrypt.MD5EncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/encrypt/MD5EncryptAlgorithm.java)                 |
-| AES                  | AES data encrypt algorithm                  | [`org.apache.shardingsphere.encrypt.algorithm.encrypt.AESEncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/encrypt/AESEncryptAlgorithm.java)                 |
-| RC4                  | RC4 data encrypt algorithm                  | [`org.apache.shardingsphere.encrypt.algorithm.encrypt.RC4EncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/encrypt/RC4EncryptAlgorithm.java)                 |
+| AES                  | AES data encrypt algorithm                  | [`org.apache.shardingsphere.encrypt.algorithm.encrypt.AESEncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/standard/AESEncryptAlgorithm.java)                 |
+| RC4                  | RC4 data encrypt algorithm                  | [`org.apache.shardingsphere.encrypt.algorithm.encrypt.RC4EncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/standard/RC4EncryptAlgorithm.java)                 |
 | SM3                  | SM3 data encrypt algorithm                  | [`org.apache.shardingsphere.encrypt.sm.algorithm.SM3EncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/plugin/sm/src/main/java/org/apache/shardingsphere/encrypt/sm/algorithm/SM3EncryptAlgorithm.java)                      |
 | SM4                  | SM4 data encrypt algorithm                  | [`org.apache.shardingsphere.encrypt.sm.algorithm.SM4EncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/plugin/sm/src/main/java/org/apache/shardingsphere/encrypt/sm/algorithm/SM4EncryptAlgorithm.java)                      |
 | CHAR_DIGEST_LIKE     | Data encryption algorithms for like queries | [`org.apache.shardingsphere.encrypt.algorithm.like.CharDigestLikeEncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/like/CharDigestLikeEncryptAlgorithm.java) |
+| MD5                  | MD5 assisted query encrypt algorithm        | [`org.apache.shardingsphere.encrypt.algorithm.encrypt.MD5EncryptAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/assisted/MD5AssistedEncryptAlgorithm.java)                 |
diff --git a/docs/document/content/user-manual/common-config/builtin-algorithm/encrypt.cn.md b/docs/document/content/user-manual/common-config/builtin-algorithm/encrypt.cn.md
index 5481105fa0c..f9c1dba1fa8 100644
--- a/docs/document/content/user-manual/common-config/builtin-algorithm/encrypt.cn.md
+++ b/docs/document/content/user-manual/common-config/builtin-algorithm/encrypt.cn.md
@@ -11,16 +11,6 @@ weight = 5
 
 ### 标准加密算法
 
-#### MD5 加密算法
-
-类型:MD5
-
-可配置属性:
-
-| *名称* | *数据类型* | *说明*   |
-|------|--------|--------|
-| salt | String | 盐值(可选) |
-
 #### AES 加密算法
 
 类型:AES
@@ -79,6 +69,18 @@ weight = 5
 | start | int    | 密文Unicode初始码(十进制)  |
 | dict  | String | 常见字                |
 
+### 辅助查询加密算法
+
+#### MD5 辅助查询加密算法
+
+类型:MD5
+
+可配置属性:
+
+| *名称* | *数据类型* | *说明*   |
+|------|--------|--------|
+| salt | String | 盐值(可选) |
+
 ## 操作步骤
 
 1. 在加密规则中配置加密器
diff --git a/docs/document/content/user-manual/common-config/builtin-algorithm/encrypt.en.md b/docs/document/content/user-manual/common-config/builtin-algorithm/encrypt.en.md
index 003453af8b4..e0f8d2f7356 100644
--- a/docs/document/content/user-manual/common-config/builtin-algorithm/encrypt.en.md
+++ b/docs/document/content/user-manual/common-config/builtin-algorithm/encrypt.en.md
@@ -11,16 +11,6 @@ Encryption algorithms are by the encryption features of Apache ShardingSphere. A
 
 ### Standard Encrypt Algorithm
 
-#### MD5 Encrypt Algorithm
-
-Type: MD5
-
-Attributes:
-
-| *Name* | *DataType* | *Description*        |
-|--------|------------|----------------------|
-| salt   | String     | Salt value(optional) |
-
 #### AES Encrypt Algorithm
 
 Type: AES
@@ -79,6 +69,18 @@ Attributes:
 | start  | int        | Ciphertext Unicode initial code(decimal number) |
 | dict   | String     | Common words                                    |
 
+### Assisted Encrypt Algorithm
+
+#### MD5 Assisted Encrypt Algorithm
+
+Type: MD5
+
+Attributes:
+
+| *Name* | *DataType* | *Description*        |
+|--------|------------|----------------------|
+| salt   | String     | Salt value(optional) |
+
 ## Operating Procedure
 
 1. Configure encryptors in an encryption rule.
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.cn.md
index b940e932e2c..18939827928 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.cn.md
@@ -58,29 +58,25 @@ rules:
       columns:
         username:
           cipherColumn: username
-          encryptorName: name_encryptor
+          encryptorName: aes_encryptor
           assistedQueryColumn: assisted_query_username
           assistedQueryEncryptorName: assisted_encryptor
           likeQueryColumn: like_query_username
           likeQueryEncryptorName: like_encryptor
         pwd:
           cipherColumn: pwd
-          encryptorName: pwd_encryptor
+          encryptorName: aes_encryptor
           assistedQueryColumn: assisted_query_pwd
           assistedQueryEncryptorName: assisted_encryptor
   encryptors:
-    name_encryptor:
+    aes_encryptor:
       type: AES
       props:
         aes-key-value: 123456abc
     assisted_encryptor:
-      type: AES
-      props:
-        aes-key-value: 123456abc
+      type: MD5
     like_encryptor:
       type: CHAR_DIGEST_LIKE
-    pwd_encryptor:
-      type: MD5
 ```
 
 然后通过 YamlShardingSphereDataSourceFactory 的 createDataSource 方法创建数据源。
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.en.md
index bdd187c5dae..221c7502222 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/encrypt.en.md
@@ -59,29 +59,25 @@ rules:
       columns:
         username:
           cipherColumn: username
-          encryptorName: name_encryptor
+          encryptorName: aes_encryptor
           assistedQueryColumn: assisted_query_username
           assistedQueryEncryptorName: assisted_encryptor
           likeQueryColumn: like_query_username
           likeQueryEncryptorName: like_encryptor
         pwd:
           cipherColumn: pwd
-          encryptorName: pwd_encryptor
+          encryptorName: aes_encryptor
           assistedQueryColumn: assisted_query_pwd
           assistedQueryEncryptorName: assisted_encryptor
   encryptors:
-    name_encryptor:
+    aes_encryptor:
       type: AES
       props:
         aes-key-value: 123456abc
     assisted_encryptor:
-      type: AES
-      props:
-        aes-key-value: 123456abc
+      type: MD5
     like_encryptor:
       type: CHAR_DIGEST_LIKE
-    pwd_encryptor:
-      type: MD5
 ```
 
 Read the YAML configuration to create a data source according to the createDataSource method of YamlShardingSphereDataSourceFactory.
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.cn.md
index e7490a159ed..98e46bdd2a3 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.cn.md
@@ -99,7 +99,7 @@ rules:
       type: AES
       props:
         aes-key-value: 123456abc
-    md5_encryptor:
+    assisted_encryptor:
       type: MD5
     like_encryptor:
       type: CHAR_DIGEST_LIKE
@@ -110,10 +110,10 @@ rules:
           cipherColumn: user_cipher
           encryptorName: aes_encryptor
           assistedQueryColumn: assisted_query_user
-          assistedQueryEncryptorName: aes_encryptor
+          assistedQueryEncryptorName: assisted_encryptor
           likeQueryColumn: like_query_user
           likeQueryEncryptorName: like_encryptor
         order_id:
           cipherColumn: order_cipher
-          encryptorName: md5_encryptor
+          encryptorName: aes_encryptor
 ```
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.en.md
index 56c0eb789f7..75a20fbef53 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.en.md
@@ -100,7 +100,7 @@ rules:
       type: AES
       props:
         aes-key-value: 123456abc
-    md5_encryptor:
+    assisted_encryptor:
       type: MD5
     like_encryptor:
       type: CHAR_DIGEST_LIKE
@@ -111,10 +111,10 @@ rules:
           cipherColumn: user_cipher
           encryptorName: aes_encryptor
           assistedQueryColumn: assisted_query_user
-          assistedQueryEncryptorName: aes_encryptor
+          assistedQueryEncryptorName: assisted_encryptor
           likeQueryColumn: like_query_user
           likeQueryEncryptorName: like_encryptor
         order_id:
           cipherColumn: order_cipher
-          encryptorName: md5_encryptor
+          encryptorName: aes_encryptor
 ```