Skip to content

Commit

Permalink
Remove like and rc4 in ShardingSphere encrypt and move to ShardingSph…
Browse files Browse the repository at this point in the history
…ere plugin repository
  • Loading branch information
strongduanmu committed Sep 25, 2023
1 parent 04e2c1c commit 17c4732
Show file tree
Hide file tree
Showing 24 changed files with 34 additions and 371 deletions.
2 changes: 0 additions & 2 deletions docs/document/content/dev-manual/encrypt.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@ chapter = true
| *配置标识* | *详细说明* | *全限定类名* |
|------------------|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 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) |
| 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) |
| 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) |
2 changes: 0 additions & 2 deletions docs/document/content/dev-manual/encrypt.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@ Data encrypt algorithm definition
| *Configuration Type* | *Description* | *Fully-qualified class name* |
|----------------------|---------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 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) |
| 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) |
| 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) |
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,6 @@ weight = 5
| aes-key-value | String | AES 使用的 KEY |
| digest-algorithm-name | String | AES KEY 的摘要算法 (可选,默认值:SHA-1) |

#### RC4 加密算法

类型:RC4

可配置属性:

| *名称* | *数据类型* | *说明* |
|---------------|--------|-------------|
| rc4-key-value | String | RC4 使用的 KEY |

### 模糊加密算法

#### 单字符摘要模糊加密算法

类型:CHAR_DIGEST_LIKE

可配置属性:

| *名称* | *数据类型* | *说明* |
|-------|--------|--------------------|
| delta | int | 字符Unicode码偏移量(十进制) |
| mask | int | 字符加密掩码(十进制) |
| start | int | 密文Unicode初始码(十进制) |
| dict | String | 常见字 |

### 辅助查询加密算法

#### MD5 辅助查询加密算法
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,6 @@ Attributes:
| aes-key-value | String | AES KEY |
| digest-algorithm-name | String | AES KEY DIGEST ALGORITHM (optional, default: SHA-1) |

#### RC4 Encrypt Algorithm

Type: RC4

Attributes:

| *Name* | *DataType* | *Description* |
|---------------|------------|---------------|
| rc4-key-value | String | RC4 KEY |

### Like Encrypt Algorithm

#### CharDigestLike Encrypt Algorithm

Type:CHAR_DIGEST_LIKE

Attributes:

| *Name* | *DataType* | *Description* |
|--------|------------|-------------------------------------------------|
| delta | int | Character Unicode offset(decimal number) |
| mask | int | Character encryption mask(decimal number) |
| start | int | Ciphertext Unicode initial code(decimal number) |
| dict | String | Common words |

### Assisted Encrypt Algorithm

#### MD5 Assisted Encrypt Algorithm
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@
#

org.apache.shardingsphere.encrypt.algorithm.standard.AESEncryptAlgorithm
org.apache.shardingsphere.encrypt.algorithm.standard.RC4EncryptAlgorithm
org.apache.shardingsphere.encrypt.algorithm.like.CharDigestLikeEncryptAlgorithm
org.apache.shardingsphere.encrypt.algorithm.assisted.MD5AssistedEncryptAlgorithm

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ rules:
assistedQuery:
name: assisted_query_username
encryptorName: assisted_encryptor
likeQuery:
name: like_query_username
encryptorName: like_encryptor
encryptors:
aes_encryptor:
type: AES
Expand All @@ -39,5 +36,3 @@ rules:
type: AES
props:
aes-key-value: 123456abc
like_encryptor:
type: CHAR_DIGEST_LIKE
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,16 @@ algorithmTypeName
buildInEncryptAlgorithmType
: standardEncryptAlgorithm
| assistedEncryptAlgorithm
| likeEncryptAlgorithm
;

standardEncryptAlgorithm
: MD5
| AES
| RC4
| SM3
| SM4
: AES
;

assistedEncryptAlgorithm
: MD5
;

likeEncryptAlgorithm
: CHAR_DIGEST_LIKE
;

propertiesDefinition
: PROPERTIES LP_ properties? RP_
;
Expand Down
Loading

0 comments on commit 17c4732

Please sign in to comment.