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 c442a2d4a0f Add get encrypt algorithm properties interface (#28112)
c442a2d4a0f is described below

commit c442a2d4a0fb8bc575a0ef4758f53b4480de8449
Author: zhaojinchao <[email protected]>
AuthorDate: Wed Aug 16 14:19:39 2023 +0800

    Add get encrypt algorithm properties interface (#28112)
    
    * Add get encrypt algorithm properties interface
    
    * Fix checkstyle
    
    * Fix checkstyle
---
 .../shardingsphere/encrypt/spi/EncryptAlgorithm.java      | 10 ++++++++++
 .../algorithm/assisted/MD5AssistedEncryptAlgorithm.java   |  7 +++++++
 .../algorithm/like/CharDigestLikeEncryptAlgorithm.java    | 15 +++++++++++++++
 .../encrypt/algorithm/standard/AESEncryptAlgorithm.java   | 14 ++++++++++++++
 .../encrypt/algorithm/standard/RC4EncryptAlgorithm.java   |  7 +++++++
 .../encrypt/fixture/CoreEncryptAlgorithmFixture.java      |  8 ++++++++
 .../fixture/CoreQueryAssistedEncryptAlgorithmFixture.java |  8 ++++++++
 .../fixture/CoreQueryLikeEncryptAlgorithmFixture.java     |  8 ++++++++
 .../encrypt/sm/algorithm/SM3EncryptAlgorithm.java         |  7 +++++++
 .../encrypt/sm/algorithm/SM4EncryptAlgorithm.java         | 15 +++++++++++++++
 .../fixture/encrypt/JDBCEncryptAlgorithmFixture.java      |  8 ++++++++
 .../encrypt/JDBCQueryAssistedEncryptAlgorithmFixture.java |  8 ++++++++
 .../encrypt/RewriteNormalEncryptAlgorithmFixture.java     |  8 ++++++++
 .../RewriteQueryAssistedEncryptAlgorithmFixture.java      |  8 ++++++++
 .../encrypt/RewriteQueryLikeEncryptAlgorithmFixture.java  |  8 ++++++++
 15 files changed, 139 insertions(+)

diff --git 
a/features/encrypt/api/src/main/java/org/apache/shardingsphere/encrypt/spi/EncryptAlgorithm.java
 
b/features/encrypt/api/src/main/java/org/apache/shardingsphere/encrypt/spi/EncryptAlgorithm.java
index b7611f40fbf..e31936c0a2c 100644
--- 
a/features/encrypt/api/src/main/java/org/apache/shardingsphere/encrypt/spi/EncryptAlgorithm.java
+++ 
b/features/encrypt/api/src/main/java/org/apache/shardingsphere/encrypt/spi/EncryptAlgorithm.java
@@ -20,6 +20,8 @@ package org.apache.shardingsphere.encrypt.spi;
 import org.apache.shardingsphere.encrypt.api.context.EncryptContext;
 import org.apache.shardingsphere.infra.algorithm.ShardingSphereAlgorithm;
 
+import java.util.Map;
+
 /**
  * Encrypt algorithm.
  *
@@ -36,4 +38,12 @@ public interface EncryptAlgorithm<I, O> extends 
ShardingSphereAlgorithm {
      * @return cipher value
      */
     O encrypt(I plainValue, EncryptContext encryptContext);
+    
+    // TODO Consider move to ShardingSphereAlgorithm.
+    /**
+     * Get properties.
+     *
+     * @return properties.
+     */
+    Map<String, Object> getProps();
 }
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 78dc9ff457a..fd2e414389d 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
@@ -17,10 +17,13 @@
 
 package org.apache.shardingsphere.encrypt.algorithm.assisted;
 
+import lombok.Getter;
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.shardingsphere.encrypt.api.context.EncryptContext;
 import 
org.apache.shardingsphere.encrypt.api.encrypt.assisted.AssistedEncryptAlgorithm;
 
+import java.util.Collections;
+import java.util.Map;
 import java.util.Properties;
 
 /**
@@ -30,11 +33,15 @@ public final class MD5AssistedEncryptAlgorithm implements 
AssistedEncryptAlgorit
     
     private static final String SALT_KEY = "salt";
     
+    @Getter
+    private Map<String, Object> props;
+    
     private String salt;
     
     @Override
     public void init(final Properties props) {
         this.salt = props.getProperty(SALT_KEY, "");
+        this.props = Collections.singletonMap("salt", salt);
     }
     
     @Override
diff --git 
a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/like/CharDigestLikeEncryptAlgorithm.java
 
b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/like/CharDigestLikeEncryptAlgorithm.java
index b880212b50d..2cb4fda1d25 100644
--- 
a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/like/CharDigestLikeEncryptAlgorithm.java
+++ 
b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/like/CharDigestLikeEncryptAlgorithm.java
@@ -18,6 +18,7 @@
 package org.apache.shardingsphere.encrypt.algorithm.like;
 
 import com.google.common.base.Strings;
+import lombok.Getter;
 import lombok.SneakyThrows;
 import org.apache.shardingsphere.encrypt.api.encrypt.like.LikeEncryptAlgorithm;
 import 
org.apache.shardingsphere.encrypt.exception.algorithm.EncryptAlgorithmInitializationException;
@@ -26,6 +27,7 @@ import 
org.apache.shardingsphere.encrypt.api.context.EncryptContext;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Map;
+import java.util.HashMap;
 import java.util.Objects;
 import java.util.Properties;
 import java.util.Scanner;
@@ -53,6 +55,9 @@ public final class CharDigestLikeEncryptAlgorithm implements 
LikeEncryptAlgorith
     
     private static final int MAX_NUMERIC_LETTER_CHAR = 255;
     
+    @Getter
+    private Map<String, Object> props;
+    
     private int delta;
     
     private int mask;
@@ -67,6 +72,7 @@ public final class CharDigestLikeEncryptAlgorithm implements 
LikeEncryptAlgorith
         mask = createMask(props);
         start = createStart(props);
         charIndexes = createCharIndexes(props);
+        this.props = createProps();
     }
     
     private int createDelta(final Properties props) {
@@ -123,6 +129,15 @@ public final class CharDigestLikeEncryptAlgorithm 
implements LikeEncryptAlgorith
         return result.toString();
     }
     
+    private Map<String, Object> createProps() {
+        Map<String, Object> result = new HashMap<>();
+        result.put("delta", delta);
+        result.put("mask", mask);
+        result.put("charIndexes", charIndexes);
+        result.put("start", start);
+        return result;
+    }
+    
     @Override
     public String encrypt(final Object plainValue, final EncryptContext 
encryptContext) {
         return null == plainValue ? null : digest(String.valueOf(plainValue));
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 952475f8e08..be79c4b22de 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
@@ -18,6 +18,7 @@
 package org.apache.shardingsphere.encrypt.algorithm.standard;
 
 import com.google.common.base.Strings;
+import lombok.Getter;
 import lombok.SneakyThrows;
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.commons.codec.digest.MessageDigestAlgorithms;
@@ -36,6 +37,8 @@ import java.security.NoSuchAlgorithmException;
 import java.util.Arrays;
 import java.util.Base64;
 import java.util.Properties;
+import java.util.Map;
+import java.util.HashMap;
 
 /**
  * AES encrypt algorithm.
@@ -46,6 +49,9 @@ public final class AESEncryptAlgorithm implements 
StandardEncryptAlgorithm<Objec
     
     private static final String DIGEST_ALGORITHM_NAME = 
"digest-algorithm-name";
     
+    @Getter
+    private Map<String, Object> props;
+    
     private byte[] secretKey;
     
     @Override
@@ -58,9 +64,17 @@ public final class AESEncryptAlgorithm implements 
StandardEncryptAlgorithm<Objec
         ShardingSpherePreconditions.checkState(!Strings.isNullOrEmpty(aesKey),
                 () -> new EncryptAlgorithmInitializationException(getType(), 
String.format("%s can not be null or empty", AES_KEY)));
         String digestAlgorithm = props.getProperty(DIGEST_ALGORITHM_NAME, 
MessageDigestAlgorithms.SHA_1);
+        this.props = createProps(aesKey, digestAlgorithm);
         return 
Arrays.copyOf(DigestUtils.getDigest(digestAlgorithm.toUpperCase()).digest(aesKey.getBytes(StandardCharsets.UTF_8)),
 16);
     }
     
+    private Map<String, Object> createProps(final String aesKey, final String 
digestAlgorithm) {
+        Map<String, Object> result = new HashMap<>();
+        result.put("aesKey", aesKey);
+        result.put("digestAlgorithm", digestAlgorithm);
+        return result;
+    }
+    
     @SneakyThrows(GeneralSecurityException.class)
     @Override
     public String encrypt(final Object plainValue, final EncryptContext 
encryptContext) {
diff --git 
a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/standard/RC4EncryptAlgorithm.java
 
b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/standard/RC4EncryptAlgorithm.java
index e8ceb83e995..2cea9cd9766 100644
--- 
a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/standard/RC4EncryptAlgorithm.java
+++ 
b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/standard/RC4EncryptAlgorithm.java
@@ -17,6 +17,7 @@
 
 package org.apache.shardingsphere.encrypt.algorithm.standard;
 
+import lombok.Getter;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.shardingsphere.encrypt.api.context.EncryptContext;
 import 
org.apache.shardingsphere.encrypt.api.encrypt.standard.StandardEncryptAlgorithm;
@@ -24,6 +25,8 @@ import 
org.apache.shardingsphere.encrypt.exception.algorithm.EncryptAlgorithmIni
 import 
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions;
 
 import java.nio.charset.StandardCharsets;
+import java.util.Collections;
+import java.util.Map;
 import java.util.Properties;
 
 /**
@@ -37,6 +40,9 @@ public final class RC4EncryptAlgorithm implements 
StandardEncryptAlgorithm<Objec
     
     private static final int SBOX_LENGTH = 256;
     
+    @Getter
+    private Map<String, Object> props;
+    
     private byte[] key;
     
     @Override
@@ -48,6 +54,7 @@ public final class RC4EncryptAlgorithm implements 
StandardEncryptAlgorithm<Objec
         byte[] result = props.getProperty(RC4_KEY, 
"").getBytes(StandardCharsets.UTF_8);
         ShardingSpherePreconditions.checkState(KEY_MIN_LENGTH <= result.length 
&& SBOX_LENGTH > result.length,
                 () -> new EncryptAlgorithmInitializationException(getType(), 
"Key length has to be between " + KEY_MIN_LENGTH + " and " + (SBOX_LENGTH - 
1)));
+        this.props = Collections.singletonMap("key", new String(result, 
StandardCharsets.UTF_8));
         return result;
     }
     
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 dedd55e1164..4621c835366 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
@@ -20,6 +20,9 @@ package org.apache.shardingsphere.encrypt.fixture;
 import 
org.apache.shardingsphere.encrypt.api.encrypt.standard.StandardEncryptAlgorithm;
 import org.apache.shardingsphere.encrypt.api.context.EncryptContext;
 
+import java.util.Collections;
+import java.util.Map;
+
 public final class CoreEncryptAlgorithmFixture implements 
StandardEncryptAlgorithm<Object, String> {
     
     @Override
@@ -27,6 +30,11 @@ public final class CoreEncryptAlgorithmFixture implements 
StandardEncryptAlgorit
         return "encryptValue";
     }
     
+    @Override
+    public Map<String, Object> getProps() {
+        return Collections.emptyMap();
+    }
+    
     @Override
     public Object decrypt(final String cipherValue, final EncryptContext 
encryptContext) {
         return "decryptValue";
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 e1cb1138e4e..94eb8a68cce 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
@@ -20,6 +20,9 @@ package org.apache.shardingsphere.encrypt.fixture;
 import org.apache.shardingsphere.encrypt.api.context.EncryptContext;
 import 
org.apache.shardingsphere.encrypt.api.encrypt.assisted.AssistedEncryptAlgorithm;
 
+import java.util.Collections;
+import java.util.Map;
+
 public final class CoreQueryAssistedEncryptAlgorithmFixture implements 
AssistedEncryptAlgorithm<Object, String> {
     
     @Override
@@ -27,6 +30,11 @@ public final class CoreQueryAssistedEncryptAlgorithmFixture 
implements AssistedE
         return "assistedEncryptValue";
     }
     
+    @Override
+    public Map<String, Object> getProps() {
+        return Collections.emptyMap();
+    }
+    
     @Override
     public String getType() {
         return "CORE.QUERY_ASSISTED.FIXTURE";
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 f9bce86ec61..3a85f4115e3 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
@@ -20,6 +20,9 @@ package org.apache.shardingsphere.encrypt.fixture;
 import org.apache.shardingsphere.encrypt.api.encrypt.like.LikeEncryptAlgorithm;
 import org.apache.shardingsphere.encrypt.api.context.EncryptContext;
 
+import java.util.Collections;
+import java.util.Map;
+
 public final class CoreQueryLikeEncryptAlgorithmFixture implements 
LikeEncryptAlgorithm<Object, String> {
     
     @Override
@@ -27,6 +30,11 @@ public final class CoreQueryLikeEncryptAlgorithmFixture 
implements LikeEncryptAl
         return "likeEncryptValue";
     }
     
+    @Override
+    public Map<String, Object> getProps() {
+        return Collections.emptyMap();
+    }
+    
     @Override
     public String getType() {
         return "CORE.QUERY_LIKE.FIXTURE";
diff --git 
a/features/encrypt/plugin/sm/src/main/java/org/apache/shardingsphere/encrypt/sm/algorithm/SM3EncryptAlgorithm.java
 
b/features/encrypt/plugin/sm/src/main/java/org/apache/shardingsphere/encrypt/sm/algorithm/SM3EncryptAlgorithm.java
index b770347664a..21900ee4fd9 100644
--- 
a/features/encrypt/plugin/sm/src/main/java/org/apache/shardingsphere/encrypt/sm/algorithm/SM3EncryptAlgorithm.java
+++ 
b/features/encrypt/plugin/sm/src/main/java/org/apache/shardingsphere/encrypt/sm/algorithm/SM3EncryptAlgorithm.java
@@ -17,6 +17,7 @@
 
 package org.apache.shardingsphere.encrypt.sm.algorithm;
 
+import lombok.Getter;
 import 
org.apache.shardingsphere.encrypt.api.encrypt.standard.StandardEncryptAlgorithm;
 import 
org.apache.shardingsphere.encrypt.exception.algorithm.EncryptAlgorithmInitializationException;
 import org.apache.shardingsphere.encrypt.api.context.EncryptContext;
@@ -27,6 +28,8 @@ import org.bouncycastle.pqc.math.linearalgebra.ByteUtils;
 
 import java.nio.charset.StandardCharsets;
 import java.security.Security;
+import java.util.Collections;
+import java.util.Map;
 import java.util.Properties;
 
 /**
@@ -42,11 +45,15 @@ public final class SM3EncryptAlgorithm implements 
StandardEncryptAlgorithm<Objec
     
     private static final int SALT_LENGTH = 8;
     
+    @Getter
+    private Map<String, Object> props;
+    
     private byte[] sm3Salt;
     
     @Override
     public void init(final Properties props) {
         sm3Salt = createSm3Salt(props);
+        this.props = Collections.singletonMap("sm3Salt", new String(sm3Salt, 
StandardCharsets.UTF_8));
     }
     
     private byte[] createSm3Salt(final Properties props) {
diff --git 
a/features/encrypt/plugin/sm/src/main/java/org/apache/shardingsphere/encrypt/sm/algorithm/SM4EncryptAlgorithm.java
 
b/features/encrypt/plugin/sm/src/main/java/org/apache/shardingsphere/encrypt/sm/algorithm/SM4EncryptAlgorithm.java
index 2a4faf3510b..e40634cb31b 100644
--- 
a/features/encrypt/plugin/sm/src/main/java/org/apache/shardingsphere/encrypt/sm/algorithm/SM4EncryptAlgorithm.java
+++ 
b/features/encrypt/plugin/sm/src/main/java/org/apache/shardingsphere/encrypt/sm/algorithm/SM4EncryptAlgorithm.java
@@ -17,6 +17,7 @@
 
 package org.apache.shardingsphere.encrypt.sm.algorithm;
 
+import lombok.Getter;
 import lombok.SneakyThrows;
 import 
org.apache.shardingsphere.encrypt.api.encrypt.standard.StandardEncryptAlgorithm;
 import 
org.apache.shardingsphere.encrypt.exception.algorithm.EncryptAlgorithmInitializationException;
@@ -35,6 +36,8 @@ import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Properties;
 import java.util.Set;
+import java.util.Map;
+import java.util.HashMap;
 
 /**
  * SM4 encrypt algorithm.
@@ -61,6 +64,9 @@ public final class SM4EncryptAlgorithm implements 
StandardEncryptAlgorithm<Objec
     
     private static final Set<String> PADDINGS = new 
HashSet<>(Arrays.asList("PKCS5Padding", "PKCS7Padding"));
     
+    @Getter
+    private Map<String, Object> props;
+    
     private byte[] sm4Key;
     
     private byte[] sm4Iv;
@@ -74,6 +80,7 @@ public final class SM4EncryptAlgorithm implements 
StandardEncryptAlgorithm<Objec
         sm4ModePadding = "SM4/" + sm4Mode + "/" + sm4Padding;
         sm4Key = createSm4Key(props);
         sm4Iv = createSm4Iv(props, sm4Mode);
+        this.props = createProps();
     }
     
     private String createSm4Mode(final Properties props) {
@@ -109,6 +116,14 @@ public final class SM4EncryptAlgorithm implements 
StandardEncryptAlgorithm<Objec
         return result;
     }
     
+    private Map<String, Object> createProps() {
+        Map<String, Object> result = new HashMap<>();
+        result.put("sm4Key", ByteUtils.toHexString(sm4Key));
+        result.put("sm4Iv", ByteUtils.toHexString(sm4Iv));
+        result.put("sm4ModePadding", sm4ModePadding);
+        return result;
+    }
+    
     @Override
     public String encrypt(final Object plainValue, final EncryptContext 
encryptContext) {
         return null == plainValue ? null : 
ByteUtils.toHexString(encrypt(String.valueOf(plainValue).getBytes(StandardCharsets.UTF_8)));
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 7b88cb7af67..40d7805db1e 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
@@ -20,6 +20,9 @@ package 
org.apache.shardingsphere.test.e2e.driver.fixture.encrypt;
 import 
org.apache.shardingsphere.encrypt.api.encrypt.standard.StandardEncryptAlgorithm;
 import org.apache.shardingsphere.encrypt.api.context.EncryptContext;
 
+import java.util.Collections;
+import java.util.Map;
+
 public final class JDBCEncryptAlgorithmFixture implements 
StandardEncryptAlgorithm<Object, String> {
     
     @Override
@@ -27,6 +30,11 @@ public final class JDBCEncryptAlgorithmFixture implements 
StandardEncryptAlgorit
         return "encryptValue";
     }
     
+    @Override
+    public Map<String, Object> getProps() {
+        return Collections.emptyMap();
+    }
+    
     @Override
     public Object decrypt(final String cipherValue, final EncryptContext 
encryptContext) {
         return "decryptValue";
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 bcfc186e8c5..a9eb27fdc09 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
@@ -20,6 +20,9 @@ package 
org.apache.shardingsphere.test.e2e.driver.fixture.encrypt;
 import org.apache.shardingsphere.encrypt.api.context.EncryptContext;
 import 
org.apache.shardingsphere.encrypt.api.encrypt.assisted.AssistedEncryptAlgorithm;
 
+import java.util.Collections;
+import java.util.Map;
+
 public final class JDBCQueryAssistedEncryptAlgorithmFixture implements 
AssistedEncryptAlgorithm<Object, String> {
     
     @Override
@@ -27,6 +30,11 @@ public final class JDBCQueryAssistedEncryptAlgorithmFixture 
implements AssistedE
         return "assistedEncryptValue";
     }
     
+    @Override
+    public Map<String, Object> getProps() {
+        return Collections.emptyMap();
+    }
+    
     @Override
     public String getType() {
         return "JDBC.QUERY_ASSISTED.FIXTURE";
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 8c6398531ac..ce61aac5a66 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
@@ -20,6 +20,9 @@ package 
org.apache.shardingsphere.test.it.rewrite.fixture.encrypt;
 import 
org.apache.shardingsphere.encrypt.api.encrypt.standard.StandardEncryptAlgorithm;
 import org.apache.shardingsphere.encrypt.api.context.EncryptContext;
 
+import java.util.Collections;
+import java.util.Map;
+
 public final class RewriteNormalEncryptAlgorithmFixture implements 
StandardEncryptAlgorithm<Object, String> {
     
     @Override
@@ -30,6 +33,11 @@ public final class RewriteNormalEncryptAlgorithmFixture 
implements StandardEncry
         return "encrypt_" + plainValue;
     }
     
+    @Override
+    public Map<String, Object> getProps() {
+        return Collections.emptyMap();
+    }
+    
     @Override
     public Object decrypt(final String cipherValue, final EncryptContext 
encryptContext) {
         if (null == cipherValue) {
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 1381a68fe1c..2b2c439acc3 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
@@ -20,6 +20,9 @@ package 
org.apache.shardingsphere.test.it.rewrite.fixture.encrypt;
 import org.apache.shardingsphere.encrypt.api.context.EncryptContext;
 import 
org.apache.shardingsphere.encrypt.api.encrypt.assisted.AssistedEncryptAlgorithm;
 
+import java.util.Collections;
+import java.util.Map;
+
 public final class RewriteQueryAssistedEncryptAlgorithmFixture implements 
AssistedEncryptAlgorithm<Object, String> {
     
     @Override
@@ -30,6 +33,11 @@ public final class 
RewriteQueryAssistedEncryptAlgorithmFixture implements Assist
         return "assisted_query_" + plainValue;
     }
     
+    @Override
+    public Map<String, Object> getProps() {
+        return Collections.emptyMap();
+    }
+    
     @Override
     public String getType() {
         return "REWRITE.ASSISTED_QUERY.FIXTURE";
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 2ab6a4dce13..702ce6d0f4b 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
@@ -20,6 +20,9 @@ package 
org.apache.shardingsphere.test.it.rewrite.fixture.encrypt;
 import org.apache.shardingsphere.encrypt.api.encrypt.like.LikeEncryptAlgorithm;
 import org.apache.shardingsphere.encrypt.api.context.EncryptContext;
 
+import java.util.Collections;
+import java.util.Map;
+
 public final class RewriteQueryLikeEncryptAlgorithmFixture implements 
LikeEncryptAlgorithm<Object, String> {
     
     @Override
@@ -27,6 +30,11 @@ public final class RewriteQueryLikeEncryptAlgorithmFixture 
implements LikeEncryp
         return null == plainValue ? null : "like_query_" + plainValue;
     }
     
+    @Override
+    public Map<String, Object> getProps() {
+        return Collections.emptyMap();
+    }
+    
     @Override
     public String getType() {
         return "REWRITE.LIKE_QUERY.FIXTURE";

Reply via email to