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

duanzhengqiang 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 aa340337d1e Add EncryptAlgorithmMetaData defaultProperties. (#30905)
aa340337d1e is described below

commit aa340337d1e99dab77a3904f05eb786537b53f16
Author: Cong Hu <[email protected]>
AuthorDate: Mon Apr 22 07:58:57 2024 +0800

    Add EncryptAlgorithmMetaData defaultProperties. (#30905)
---
 .../encrypt/api/config/EncryptRuleConfiguration.java | 14 ++++++++++++--
 .../encrypt/spi/EncryptAlgorithmMetaData.java        |  4 ++++
 .../assisted/MD5AssistedEncryptAlgorithm.java        |  2 +-
 .../algorithm/standard/AESEncryptAlgorithm.java      | 14 +++++++++++---
 .../encrypt/fixture/CoreEncryptAlgorithmFixture.java |  4 +++-
 .../CoreQueryAssistedEncryptAlgorithmFixture.java    |  4 +++-
 .../CoreQueryLikeEncryptAlgorithmFixture.java        |  4 +++-
 .../fixture/DistSQLEncryptAlgorithmFixture.java      |  4 +++-
 .../infra/spi/type/typed/TypedSPILoader.java         | 20 ++++++++++++++++++++
 .../src/test/resources/expected/convert-encrypt.yaml |  4 ++--
 .../src/test/resources/expected/convert-mix.yaml     |  4 ++--
 .../fixture/encrypt/JDBCEncryptAlgorithmFixture.java |  4 +++-
 .../JDBCQueryAssistedEncryptAlgorithmFixture.java    |  4 +++-
 .../e2e/fixture/ITEncryptLikeAlgorithmFixture.java   |  2 +-
 .../dataset/rdl_empty_rules/alter_encrypt_rule.xml   |  2 +-
 .../dataset/rdl_empty_rules/create_encrypt_rule.xml  |  2 +-
 .../show_encrypt_rule.xml                            |  2 +-
 .../show_encrypt_rules.xml                           |  6 +++---
 .../cases/rql/dataset/encrypt/show_encrypt_rule.xml  |  8 ++++----
 .../cases/rql/dataset/encrypt/show_encrypt_rules.xml | 16 ++++++++--------
 .../show_encrypt_rule.xml                            |  2 +-
 .../show_encrypt_rules.xml                           | 10 +++++-----
 .../sharding_and_encrypt/show_encrypt_rule.xml       |  2 +-
 .../sharding_and_encrypt/show_encrypt_rules.xml      | 10 +++++-----
 .../encrypt/RewriteEncryptLikeAlgorithmFixture.java  |  2 +-
 .../RewriteNormalEncryptAlgorithmFixture.java        |  4 +++-
 .../RewriteQueryAssistedEncryptAlgorithmFixture.java |  4 +++-
 .../RewriteQueryLikeEncryptAlgorithmFixture.java     |  4 +++-
 .../TestQueryAssistedShardingEncryptAlgorithm.java   |  4 +++-
 29 files changed, 114 insertions(+), 52 deletions(-)

diff --git 
a/features/encrypt/api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptRuleConfiguration.java
 
b/features/encrypt/api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptRuleConfiguration.java
index 5c07c43be97..0ead0f4f5a1 100644
--- 
a/features/encrypt/api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptRuleConfiguration.java
+++ 
b/features/encrypt/api/src/main/java/org/apache/shardingsphere/encrypt/api/config/EncryptRuleConfiguration.java
@@ -18,11 +18,13 @@
 package org.apache.shardingsphere.encrypt.api.config;
 
 import lombok.Getter;
-import lombok.RequiredArgsConstructor;
 import 
org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
+import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
+import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithmMetaData;
 import 
org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration;
 import 
org.apache.shardingsphere.infra.config.rule.function.EnhancedRuleConfiguration;
 import 
org.apache.shardingsphere.infra.config.rule.scope.DatabaseRuleConfiguration;
+import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
 
 import java.util.Collection;
 import java.util.Map;
@@ -30,7 +32,6 @@ import java.util.Map;
 /**
  * Encrypt rule configuration.
  */
-@RequiredArgsConstructor
 @Getter
 public final class EncryptRuleConfiguration implements 
DatabaseRuleConfiguration, EnhancedRuleConfiguration {
     
@@ -38,6 +39,15 @@ public final class EncryptRuleConfiguration implements 
DatabaseRuleConfiguration
     
     private final Map<String, AlgorithmConfiguration> encryptors;
     
+    public EncryptRuleConfiguration(final 
Collection<EncryptTableRuleConfiguration> tables, final Map<String, 
AlgorithmConfiguration> encryptors) {
+        this.tables = tables;
+        this.encryptors = encryptors;
+        for (AlgorithmConfiguration each : encryptors.values()) {
+            TypedSPILoader.findUninitedService(EncryptAlgorithm.class, 
each.getType()).map(EncryptAlgorithm::getMetaData).map(EncryptAlgorithmMetaData::getDefaultProps)
+                    .ifPresent(each.getProps()::putAll);
+        }
+    }
+    
     @Override
     public boolean isEmpty() {
         return tables.isEmpty();
diff --git 
a/features/encrypt/api/src/main/java/org/apache/shardingsphere/encrypt/spi/EncryptAlgorithmMetaData.java
 
b/features/encrypt/api/src/main/java/org/apache/shardingsphere/encrypt/spi/EncryptAlgorithmMetaData.java
index 01cc3876eb1..e16e6c9bfcd 100644
--- 
a/features/encrypt/api/src/main/java/org/apache/shardingsphere/encrypt/spi/EncryptAlgorithmMetaData.java
+++ 
b/features/encrypt/api/src/main/java/org/apache/shardingsphere/encrypt/spi/EncryptAlgorithmMetaData.java
@@ -20,6 +20,8 @@ package org.apache.shardingsphere.encrypt.spi;
 import lombok.Getter;
 import lombok.RequiredArgsConstructor;
 
+import java.util.Properties;
+
 /**
  * Encrypt algorithm meta data.
  */
@@ -32,4 +34,6 @@ public final class EncryptAlgorithmMetaData {
     private final boolean supportEquivalentFilter;
     
     private final boolean supportLike;
+    
+    private final Properties defaultProps;
 }
diff --git 
a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/assisted/MD5AssistedEncryptAlgorithm.java
 
b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/assisted/MD5AssistedEncryptAlgorithm.java
index 1a9d9c28279..474ab334afe 100644
--- 
a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/assisted/MD5AssistedEncryptAlgorithm.java
+++ 
b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/assisted/MD5AssistedEncryptAlgorithm.java
@@ -34,7 +34,7 @@ import java.util.Properties;
 public final class MD5AssistedEncryptAlgorithm implements EncryptAlgorithm {
     
     @Getter
-    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, false);
+    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, false, new Properties());
     
     private MessageDigestAlgorithm digestAlgorithm;
     
diff --git 
a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/standard/AESEncryptAlgorithm.java
 
b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/standard/AESEncryptAlgorithm.java
index 89bf5cdc6ca..156b04844f2 100644
--- 
a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/standard/AESEncryptAlgorithm.java
+++ 
b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/standard/AESEncryptAlgorithm.java
@@ -47,19 +47,27 @@ public final class AESEncryptAlgorithm implements 
EncryptAlgorithm {
     private static final String DIGEST_ALGORITHM_NAME = 
"digest-algorithm-name";
     
     @Getter
-    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(true, true, false);
+    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(true, true, false, getDefaultProperties());
     
     private byte[] secretKey;
     
+    private Properties getDefaultProperties() {
+        Properties result = new Properties();
+        result.setProperty(DIGEST_ALGORITHM_NAME, 
MessageDigestAlgorithms.SHA_1);
+        return result;
+    }
+    
     @Override
     public void init(final Properties props) {
-        secretKey = getSecretKey(props);
+        Properties properties = new Properties(metaData.getDefaultProps());
+        properties.putAll(props);
+        secretKey = getSecretKey(properties);
     }
     
     private byte[] getSecretKey(final Properties props) {
         String aesKey = props.getProperty(AES_KEY);
         ShardingSpherePreconditions.checkNotEmpty(aesKey, () -> new 
AlgorithmInitializationException(this, "%s can not be null or empty", AES_KEY));
-        String digestAlgorithm = props.getProperty(DIGEST_ALGORITHM_NAME, 
MessageDigestAlgorithms.SHA_1);
+        String digestAlgorithm = props.getProperty(DIGEST_ALGORITHM_NAME);
         return 
Arrays.copyOf(DigestUtils.getDigest(digestAlgorithm.toUpperCase()).digest(aesKey.getBytes(StandardCharsets.UTF_8)),
 16);
     }
     
diff --git 
a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/fixture/CoreEncryptAlgorithmFixture.java
 
b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/fixture/CoreEncryptAlgorithmFixture.java
index 1a817ef8bda..217a205948f 100644
--- 
a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/fixture/CoreEncryptAlgorithmFixture.java
+++ 
b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/fixture/CoreEncryptAlgorithmFixture.java
@@ -22,10 +22,12 @@ import 
org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
 import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithmMetaData;
 import 
org.apache.shardingsphere.infra.algorithm.core.context.AlgorithmSQLContext;
 
+import java.util.Properties;
+
 @Getter
 public final class CoreEncryptAlgorithmFixture implements EncryptAlgorithm {
     
-    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(true, true, false);
+    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(true, true, false, new Properties());
     
     @Override
     public String encrypt(final Object plainValue, final AlgorithmSQLContext 
algorithmSQLContext) {
diff --git 
a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/fixture/CoreQueryAssistedEncryptAlgorithmFixture.java
 
b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/fixture/CoreQueryAssistedEncryptAlgorithmFixture.java
index d91d66573c8..0ed7c190530 100644
--- 
a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/fixture/CoreQueryAssistedEncryptAlgorithmFixture.java
+++ 
b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/fixture/CoreQueryAssistedEncryptAlgorithmFixture.java
@@ -22,10 +22,12 @@ import 
org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
 import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithmMetaData;
 import 
org.apache.shardingsphere.infra.algorithm.core.context.AlgorithmSQLContext;
 
+import java.util.Properties;
+
 @Getter
 public final class CoreQueryAssistedEncryptAlgorithmFixture implements 
EncryptAlgorithm {
     
-    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, false);
+    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, false, new Properties());
     
     @Override
     public String encrypt(final Object plainValue, final AlgorithmSQLContext 
algorithmSQLContext) {
diff --git 
a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/fixture/CoreQueryLikeEncryptAlgorithmFixture.java
 
b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/fixture/CoreQueryLikeEncryptAlgorithmFixture.java
index 6295a91591e..a3c5a8a80af 100644
--- 
a/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/fixture/CoreQueryLikeEncryptAlgorithmFixture.java
+++ 
b/features/encrypt/core/src/test/java/org/apache/shardingsphere/encrypt/fixture/CoreQueryLikeEncryptAlgorithmFixture.java
@@ -22,10 +22,12 @@ import 
org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
 import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithmMetaData;
 import 
org.apache.shardingsphere.infra.algorithm.core.context.AlgorithmSQLContext;
 
+import java.util.Properties;
+
 @Getter
 public final class CoreQueryLikeEncryptAlgorithmFixture implements 
EncryptAlgorithm {
     
-    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, false, true);
+    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, false, true, new Properties());
     
     @Override
     public String encrypt(final Object plainValue, final AlgorithmSQLContext 
algorithmSQLContext) {
diff --git 
a/features/encrypt/distsql/handler/src/test/java/org/apache/shardingsphere/encrypt/distsql/handler/fixture/DistSQLEncryptAlgorithmFixture.java
 
b/features/encrypt/distsql/handler/src/test/java/org/apache/shardingsphere/encrypt/distsql/handler/fixture/DistSQLEncryptAlgorithmFixture.java
index 5a331f4553e..3225950e500 100644
--- 
a/features/encrypt/distsql/handler/src/test/java/org/apache/shardingsphere/encrypt/distsql/handler/fixture/DistSQLEncryptAlgorithmFixture.java
+++ 
b/features/encrypt/distsql/handler/src/test/java/org/apache/shardingsphere/encrypt/distsql/handler/fixture/DistSQLEncryptAlgorithmFixture.java
@@ -22,10 +22,12 @@ import 
org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
 import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithmMetaData;
 import 
org.apache.shardingsphere.infra.algorithm.core.context.AlgorithmSQLContext;
 
+import java.util.Properties;
+
 @Getter
 public final class DistSQLEncryptAlgorithmFixture implements EncryptAlgorithm {
     
-    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(true, true, false);
+    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(true, true, false, new Properties());
     
     @Override
     public String encrypt(final Object plainValue, final AlgorithmSQLContext 
algorithmSQLContext) {
diff --git 
a/infra/spi/src/main/java/org/apache/shardingsphere/infra/spi/type/typed/TypedSPILoader.java
 
b/infra/spi/src/main/java/org/apache/shardingsphere/infra/spi/type/typed/TypedSPILoader.java
index c3c664c47db..3827f1bc3b7 100644
--- 
a/infra/spi/src/main/java/org/apache/shardingsphere/infra/spi/type/typed/TypedSPILoader.java
+++ 
b/infra/spi/src/main/java/org/apache/shardingsphere/infra/spi/type/typed/TypedSPILoader.java
@@ -65,6 +65,26 @@ public final class TypedSPILoader {
         return Optional.empty();
     }
     
+    /**
+     * Find uninited service.
+     *
+     * @param serviceInterface typed SPI service interface
+     * @param type type
+     * @param <T> SPI class type
+     * @return found service
+     */
+    public static <T extends TypedSPI> Optional<T> findUninitedService(final 
Class<T> serviceInterface, final Object type) {
+        if (null == type) {
+            return findDefaultService(serviceInterface);
+        }
+        for (T each : 
ShardingSphereServiceLoader.getServiceInstances(serviceInterface)) {
+            if (matchesType(type, each)) {
+                return Optional.of(each);
+            }
+        }
+        return Optional.empty();
+    }
+    
     private static <T extends TypedSPI> Optional<T> findDefaultService(final 
Class<T> serviceInterface) {
         for (T each : 
ShardingSphereServiceLoader.getServiceInstances(serviceInterface)) {
             if (!each.isDefault()) {
diff --git 
a/proxy/backend/core/src/test/resources/expected/convert-encrypt.yaml 
b/proxy/backend/core/src/test/resources/expected/convert-encrypt.yaml
index 87054a9a4c6..5cc68799cf5 100644
--- a/proxy/backend/core/src/test/resources/expected/convert-encrypt.yaml
+++ b/proxy/backend/core/src/test/resources/expected/convert-encrypt.yaml
@@ -31,6 +31,6 @@ 
PROPERTIES('minPoolSize'='1','connectionTimeoutMilliseconds'='30000','maxLifetim
 
 CREATE ENCRYPT RULE t_encrypt (
 COLUMNS(
-(NAME=user_id, CIPHER=user_cipher, ASSISTED_QUERY_COLUMN=user_assisted, 
LIKE_QUERY_COLUMN=user_like, ENCRYPT_ALGORITHM(TYPE(NAME='aes', 
PROPERTIES('aes-key-value'='123456abc'))), 
ASSISTED_QUERY_ALGORITHM(TYPE(NAME='aes', 
PROPERTIES('aes-key-value'='123456abc'))), 
LIKE_QUERY_ALGORITHM(TYPE(NAME='core.query_like.fixture'))),
-(NAME=order_id, CIPHER=order_cipher, ENCRYPT_ALGORITHM(TYPE(NAME='aes', 
PROPERTIES('aes-key-value'='123456abc'))))
+(NAME=user_id, CIPHER=user_cipher, ASSISTED_QUERY_COLUMN=user_assisted, 
LIKE_QUERY_COLUMN=user_like, ENCRYPT_ALGORITHM(TYPE(NAME='aes', 
PROPERTIES('aes-key-value'='123456abc', 'digest-algorithm-name'='SHA-1'))), 
ASSISTED_QUERY_ALGORITHM(TYPE(NAME='aes', 
PROPERTIES('aes-key-value'='123456abc', 'digest-algorithm-name'='SHA-1'))), 
LIKE_QUERY_ALGORITHM(TYPE(NAME='core.query_like.fixture'))),
+(NAME=order_id, CIPHER=order_cipher, ENCRYPT_ALGORITHM(TYPE(NAME='aes', 
PROPERTIES('aes-key-value'='123456abc', 'digest-algorithm-name'='SHA-1'))))
 ));
diff --git a/proxy/backend/core/src/test/resources/expected/convert-mix.yaml 
b/proxy/backend/core/src/test/resources/expected/convert-mix.yaml
index 444c84007b8..948e1d1f609 100644
--- a/proxy/backend/core/src/test/resources/expected/convert-mix.yaml
+++ b/proxy/backend/core/src/test/resources/expected/convert-mix.yaml
@@ -63,8 +63,8 @@ TYPE(NAME='random')
 
 CREATE ENCRYPT RULE t_encrypt (
 COLUMNS(
-(NAME=user_id, CIPHER=user_cipher, ASSISTED_QUERY_COLUMN=user_assisted, 
ENCRYPT_ALGORITHM(TYPE(NAME='aes', PROPERTIES('aes-key-value'='123456abc'))), 
ASSISTED_QUERY_ALGORITHM(TYPE(NAME='aes', 
PROPERTIES('aes-key-value'='123456abc')))),
-(NAME=order_id, CIPHER=order_cipher, ENCRYPT_ALGORITHM(TYPE(NAME='aes', 
PROPERTIES('aes-key-value'='123456abc'))))
+(NAME=user_id, CIPHER=user_cipher, ASSISTED_QUERY_COLUMN=user_assisted, 
ENCRYPT_ALGORITHM(TYPE(NAME='aes', PROPERTIES('aes-key-value'='123456abc', 
'digest-algorithm-name'='SHA-1'))), ASSISTED_QUERY_ALGORITHM(TYPE(NAME='aes', 
PROPERTIES('aes-key-value'='123456abc', 'digest-algorithm-name'='SHA-1')))),
+(NAME=order_id, CIPHER=order_cipher, ENCRYPT_ALGORITHM(TYPE(NAME='aes', 
PROPERTIES('aes-key-value'='123456abc', 'digest-algorithm-name'='SHA-1'))))
 ));
 
 CREATE SHARDING TABLE RULE t_order (
diff --git 
a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCEncryptAlgorithmFixture.java
 
b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCEncryptAlgorithmFixture.java
index 22e04596b5c..afc013ee7b8 100644
--- 
a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCEncryptAlgorithmFixture.java
+++ 
b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCEncryptAlgorithmFixture.java
@@ -22,10 +22,12 @@ import 
org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
 import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithmMetaData;
 import 
org.apache.shardingsphere.infra.algorithm.core.context.AlgorithmSQLContext;
 
+import java.util.Properties;
+
 @Getter
 public final class JDBCEncryptAlgorithmFixture implements EncryptAlgorithm {
     
-    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(true, true, false);
+    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(true, true, false, new Properties());
     
     @Override
     public String encrypt(final Object plainValue, final AlgorithmSQLContext 
algorithmSQLContext) {
diff --git 
a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCQueryAssistedEncryptAlgorithmFixture.java
 
b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCQueryAssistedEncryptAlgorithmFixture.java
index 76835ff8537..1fdf369fdd9 100644
--- 
a/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCQueryAssistedEncryptAlgorithmFixture.java
+++ 
b/test/e2e/driver/src/test/java/org/apache/shardingsphere/test/e2e/driver/fixture/encrypt/JDBCQueryAssistedEncryptAlgorithmFixture.java
@@ -22,10 +22,12 @@ import 
org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
 import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithmMetaData;
 import 
org.apache.shardingsphere.infra.algorithm.core.context.AlgorithmSQLContext;
 
+import java.util.Properties;
+
 @Getter
 public final class JDBCQueryAssistedEncryptAlgorithmFixture implements 
EncryptAlgorithm {
     
-    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, false);
+    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, false, new Properties());
     
     @Override
     public String encrypt(final Object plainValue, final AlgorithmSQLContext 
algorithmSQLContext) {
diff --git 
a/test/e2e/fixture/src/test/java/org/apache/shardingsphere/test/e2e/fixture/ITEncryptLikeAlgorithmFixture.java
 
b/test/e2e/fixture/src/test/java/org/apache/shardingsphere/test/e2e/fixture/ITEncryptLikeAlgorithmFixture.java
index 51ab4fa60b5..f6bba771213 100644
--- 
a/test/e2e/fixture/src/test/java/org/apache/shardingsphere/test/e2e/fixture/ITEncryptLikeAlgorithmFixture.java
+++ 
b/test/e2e/fixture/src/test/java/org/apache/shardingsphere/test/e2e/fixture/ITEncryptLikeAlgorithmFixture.java
@@ -53,7 +53,7 @@ public final class ITEncryptLikeAlgorithmFixture implements 
EncryptAlgorithm {
     private static final int MAX_NUMERIC_LETTER_CHAR = 255;
     
     @Getter
-    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, true);
+    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, true, new Properties());
     
     private int delta;
     
diff --git 
a/test/e2e/sql/src/test/resources/cases/rdl/dataset/rdl_empty_rules/alter_encrypt_rule.xml
 
b/test/e2e/sql/src/test/resources/cases/rdl/dataset/rdl_empty_rules/alter_encrypt_rule.xml
index 9d7cef4baad..57cdd9bf3d6 100644
--- 
a/test/e2e/sql/src/test/resources/cases/rdl/dataset/rdl_empty_rules/alter_encrypt_rule.xml
+++ 
b/test/e2e/sql/src/test/resources/cases/rdl/dataset/rdl_empty_rules/alter_encrypt_rule.xml
@@ -29,5 +29,5 @@
         <column name="like_query_type" />
         <column name="like_query_props" />
     </metadata>
-    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abcd&quot;}| | | | " />
+    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abcd&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
 </dataset>
diff --git 
a/test/e2e/sql/src/test/resources/cases/rdl/dataset/rdl_empty_rules/create_encrypt_rule.xml
 
b/test/e2e/sql/src/test/resources/cases/rdl/dataset/rdl_empty_rules/create_encrypt_rule.xml
index 78943c0ed8c..6f617e61f40 100644
--- 
a/test/e2e/sql/src/test/resources/cases/rdl/dataset/rdl_empty_rules/create_encrypt_rule.xml
+++ 
b/test/e2e/sql/src/test/resources/cases/rdl/dataset/rdl_empty_rules/create_encrypt_rule.xml
@@ -29,5 +29,5 @@
         <column name="like_query_type" />
         <column name="like_query_props" />
     </metadata>
-    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
+    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
 </dataset>
diff --git 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting_and_encrypt/show_encrypt_rule.xml
 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting_and_encrypt/show_encrypt_rule.xml
index 78943c0ed8c..6f617e61f40 100644
--- 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting_and_encrypt/show_encrypt_rule.xml
+++ 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting_and_encrypt/show_encrypt_rule.xml
@@ -29,5 +29,5 @@
         <column name="like_query_type" />
         <column name="like_query_props" />
     </metadata>
-    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
+    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
 </dataset>
diff --git 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting_and_encrypt/show_encrypt_rules.xml
 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting_and_encrypt/show_encrypt_rules.xml
index eff9baef4d7..ce264dcef4f 100644
--- 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting_and_encrypt/show_encrypt_rules.xml
+++ 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/dbtbl_with_readwrite_splitting_and_encrypt/show_encrypt_rules.xml
@@ -29,7 +29,7 @@
         <column name="like_query_type" />
         <column name="like_query_props" />
     </metadata>
-    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_user_details| number| number_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_user_details| number_new| number_new_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
+    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_user_details| number| number_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_user_details| number_new| number_new_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
 </dataset>
diff --git 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt/show_encrypt_rule.xml
 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt/show_encrypt_rule.xml
index a613cd05a00..8500f38afa5 100644
--- 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt/show_encrypt_rule.xml
+++ 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt/show_encrypt_rule.xml
@@ -29,8 +29,8 @@
         <column name="like_query_type" />
         <column name="like_query_props" />
     </metadata>
-    <row values="t_user| user_name| user_name_cipher| | user_name_like| AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | IT.ENCRYPT.LIKE.FIXTURE| 
{&quot;mask&quot;:4093}" />
-    <row values="t_user| password| password_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_user| email| email_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_user| telephone| user_telephone_cipher| | 
user_telephone_like| AES| {&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | 
| IT.ENCRYPT.LIKE.FIXTURE| {&quot;mask&quot;:4093}" />
+    <row values="t_user| user_name| user_name_cipher| | user_name_like| AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | IT.ENCRYPT.LIKE.FIXTURE| {&quot;mask&quot;:4093}"/>
+    <row values="t_user| password| password_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_user| email| email_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_user| telephone| user_telephone_cipher| | 
user_telephone_like| AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | IT.ENCRYPT.LIKE.FIXTURE| {&quot;mask&quot;:4093}"/>
 </dataset>
diff --git 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt/show_encrypt_rules.xml
 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt/show_encrypt_rules.xml
index 7704ba6192f..1e9c0894316 100644
--- 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt/show_encrypt_rules.xml
+++ 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt/show_encrypt_rules.xml
@@ -29,12 +29,12 @@
         <column name="like_query_type" />
         <column name="like_query_props" />
     </metadata>
-    <row values="t_user| user_name| user_name_cipher| | user_name_like| AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | IT.ENCRYPT.LIKE.FIXTURE| 
{&quot;mask&quot;:4093}" />
-    <row values="t_user| password| password_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_user| email| email_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_user| telephone| user_telephone_cipher| | 
user_telephone_like| AES| {&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | 
| IT.ENCRYPT.LIKE.FIXTURE| {&quot;mask&quot;:4093}" />
-    <row values="t_user_details| number| number_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_user_details| number_new| number_new_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_merchant| business_code| business_code_cipher| | 
business_code_like| AES| {&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | 
IT.ENCRYPT.LIKE.FIXTURE | {&quot;mask&quot;:4093} " />
-    <row values="t_merchant| telephone| merchant_telephone_cipher| | 
merchant_telephone_like| AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | IT.ENCRYPT.LIKE.FIXTURE 
| {&quot;mask&quot;:4093} " />
+    <row values="t_user| user_name| user_name_cipher| | user_name_like| AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | IT.ENCRYPT.LIKE.FIXTURE| {&quot;mask&quot;:4093}"/>
+    <row values="t_user| password| password_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_user| email| email_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_user| telephone| user_telephone_cipher| | 
user_telephone_like| AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | IT.ENCRYPT.LIKE.FIXTURE| {&quot;mask&quot;:4093}"/>
+    <row values="t_user_details| number| number_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_user_details| number_new| number_new_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_merchant| business_code| business_code_cipher| | 
business_code_like| AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | IT.ENCRYPT.LIKE.FIXTURE | {&quot;mask&quot;:4093} "/>
+    <row values="t_merchant| telephone| merchant_telephone_cipher| | 
merchant_telephone_like| AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | IT.ENCRYPT.LIKE.FIXTURE | {&quot;mask&quot;:4093} "/>
 </dataset>
diff --git 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt_and_readwrite_splitting/show_encrypt_rule.xml
 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt_and_readwrite_splitting/show_encrypt_rule.xml
index 78943c0ed8c..6f617e61f40 100644
--- 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt_and_readwrite_splitting/show_encrypt_rule.xml
+++ 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt_and_readwrite_splitting/show_encrypt_rule.xml
@@ -29,5 +29,5 @@
         <column name="like_query_type" />
         <column name="like_query_props" />
     </metadata>
-    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
+    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
 </dataset>
diff --git 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt_and_readwrite_splitting/show_encrypt_rules.xml
 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt_and_readwrite_splitting/show_encrypt_rules.xml
index d55eca20239..37a6dc0afcc 100644
--- 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt_and_readwrite_splitting/show_encrypt_rules.xml
+++ 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/encrypt_and_readwrite_splitting/show_encrypt_rules.xml
@@ -29,9 +29,9 @@
         <column name="like_query_type" />
         <column name="like_query_props" />
     </metadata>
-    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_user_details| number| number_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_user_details| number_new| number_new_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_merchant| business_code| business_code_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_merchant| telephone| telephone_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
+    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_user_details| number| number_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_user_details| number_new| number_new_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_merchant| business_code| business_code_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_merchant| telephone| telephone_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
 </dataset>
diff --git 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/sharding_and_encrypt/show_encrypt_rule.xml
 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/sharding_and_encrypt/show_encrypt_rule.xml
index 78943c0ed8c..6f617e61f40 100644
--- 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/sharding_and_encrypt/show_encrypt_rule.xml
+++ 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/sharding_and_encrypt/show_encrypt_rule.xml
@@ -29,5 +29,5 @@
         <column name="like_query_type" />
         <column name="like_query_props" />
     </metadata>
-    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
+    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
 </dataset>
diff --git 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/sharding_and_encrypt/show_encrypt_rules.xml
 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/sharding_and_encrypt/show_encrypt_rules.xml
index d55eca20239..37a6dc0afcc 100644
--- 
a/test/e2e/sql/src/test/resources/cases/rql/dataset/sharding_and_encrypt/show_encrypt_rules.xml
+++ 
b/test/e2e/sql/src/test/resources/cases/rql/dataset/sharding_and_encrypt/show_encrypt_rules.xml
@@ -29,9 +29,9 @@
         <column name="like_query_type" />
         <column name="like_query_props" />
     </metadata>
-    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_user_details| number| number_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_user_details| number_new| number_new_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_merchant| business_code| business_code_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
-    <row values="t_merchant| telephone| telephone_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;}| | | | " />
+    <row values="t_user| pwd| pwd_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_user_details| number| number_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_user_details| number_new| number_new_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_merchant| business_code| business_code_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
+    <row values="t_merchant| telephone| telephone_cipher| | | AES| 
{&quot;aes-key-value&quot;:&quot;123456abc&quot;,&quot;digest-algorithm-name&quot;:&quot;SHA-1&quot;}|
 | | | "/>
 </dataset>
diff --git 
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteEncryptLikeAlgorithmFixture.java
 
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteEncryptLikeAlgorithmFixture.java
index 12f9dd31a48..c23e7f9ee17 100644
--- 
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteEncryptLikeAlgorithmFixture.java
+++ 
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteEncryptLikeAlgorithmFixture.java
@@ -53,7 +53,7 @@ public final class RewriteEncryptLikeAlgorithmFixture 
implements EncryptAlgorith
     private static final int MAX_NUMERIC_LETTER_CHAR = 255;
     
     @Getter
-    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, true);
+    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, true, new Properties());
     
     private int delta;
     
diff --git 
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteNormalEncryptAlgorithmFixture.java
 
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteNormalEncryptAlgorithmFixture.java
index 3cc88541078..8c8c65dd3c9 100644
--- 
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteNormalEncryptAlgorithmFixture.java
+++ 
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteNormalEncryptAlgorithmFixture.java
@@ -22,10 +22,12 @@ import 
org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
 import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithmMetaData;
 import 
org.apache.shardingsphere.infra.algorithm.core.context.AlgorithmSQLContext;
 
+import java.util.Properties;
+
 @Getter
 public final class RewriteNormalEncryptAlgorithmFixture implements 
EncryptAlgorithm {
     
-    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(true, true, false);
+    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(true, true, false, new Properties());
     
     @Override
     public String encrypt(final Object plainValue, final AlgorithmSQLContext 
algorithmSQLContext) {
diff --git 
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteQueryAssistedEncryptAlgorithmFixture.java
 
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteQueryAssistedEncryptAlgorithmFixture.java
index e3c1a88245c..27950fb3e41 100644
--- 
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteQueryAssistedEncryptAlgorithmFixture.java
+++ 
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteQueryAssistedEncryptAlgorithmFixture.java
@@ -22,10 +22,12 @@ import 
org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
 import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithmMetaData;
 import 
org.apache.shardingsphere.infra.algorithm.core.context.AlgorithmSQLContext;
 
+import java.util.Properties;
+
 @Getter
 public final class RewriteQueryAssistedEncryptAlgorithmFixture implements 
EncryptAlgorithm {
     
-    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, false);
+    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, false, new Properties());
     
     @Override
     public String encrypt(final Object plainValue, final AlgorithmSQLContext 
algorithmSQLContext) {
diff --git 
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteQueryLikeEncryptAlgorithmFixture.java
 
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteQueryLikeEncryptAlgorithmFixture.java
index 21913c0ac51..c2cccdbab1c 100644
--- 
a/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteQueryLikeEncryptAlgorithmFixture.java
+++ 
b/test/it/rewriter/src/test/java/org/apache/shardingsphere/test/it/rewrite/fixture/encrypt/RewriteQueryLikeEncryptAlgorithmFixture.java
@@ -22,10 +22,12 @@ import 
org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
 import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithmMetaData;
 import 
org.apache.shardingsphere.infra.algorithm.core.context.AlgorithmSQLContext;
 
+import java.util.Properties;
+
 @Getter
 public final class RewriteQueryLikeEncryptAlgorithmFixture implements 
EncryptAlgorithm {
     
-    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, true);
+    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, true, new Properties());
     
     @Override
     public String encrypt(final Object plainValue, final AlgorithmSQLContext 
algorithmSQLContext) {
diff --git 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/commons/algorithm/TestQueryAssistedShardingEncryptAlgorithm.java
 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/commons/algorithm/TestQueryAssistedShardingEncryptAlgorithm.java
index 3bbf6ee4846..2743bb1d4f8 100644
--- 
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/commons/algorithm/TestQueryAssistedShardingEncryptAlgorithm.java
+++ 
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/commons/algorithm/TestQueryAssistedShardingEncryptAlgorithm.java
@@ -22,10 +22,12 @@ import 
org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
 import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithmMetaData;
 import 
org.apache.shardingsphere.infra.algorithm.core.context.AlgorithmSQLContext;
 
+import java.util.Properties;
+
 @Getter
 public final class TestQueryAssistedShardingEncryptAlgorithm implements 
EncryptAlgorithm {
     
-    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, false);
+    private final EncryptAlgorithmMetaData metaData = new 
EncryptAlgorithmMetaData(false, true, false, new Properties());
     
     @Override
     public String encrypt(final Object plainValue, final AlgorithmSQLContext 
algorithmSQLContext) {


Reply via email to