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 41c3e3725dc Use equals replace to EncryptAlgorithm#getProps (#28145)
41c3e3725dc is described below
commit 41c3e3725dc3c9a261bd75c74c89f86b676662f7
Author: zhaojinchao <[email protected]>
AuthorDate: Thu Aug 17 18:02:10 2023 +0800
Use equals replace to EncryptAlgorithm#getProps (#28145)
* Remove EncryptAlgorithm getProps interface
* Add @EqualsAndHashCode
---
.../shardingsphere/encrypt/spi/EncryptAlgorithm.java | 10 ----------
.../algorithm/assisted/MD5AssistedEncryptAlgorithm.java | 9 ++-------
.../algorithm/like/CharDigestLikeEncryptAlgorithm.java | 17 ++---------------
.../encrypt/algorithm/standard/AESEncryptAlgorithm.java | 16 ++--------------
.../encrypt/algorithm/standard/RC4EncryptAlgorithm.java | 9 ++-------
.../generator/EncryptPredicateColumnTokenGenerator.java | 2 +-
.../encrypt/fixture/CoreEncryptAlgorithmFixture.java | 8 --------
.../CoreQueryAssistedEncryptAlgorithmFixture.java | 8 --------
.../fixture/CoreQueryLikeEncryptAlgorithmFixture.java | 8 --------
.../encrypt/sm/algorithm/SM3EncryptAlgorithm.java | 9 ++-------
.../encrypt/sm/algorithm/SM4EncryptAlgorithm.java | 17 ++---------------
.../fixture/encrypt/JDBCEncryptAlgorithmFixture.java | 8 --------
.../JDBCQueryAssistedEncryptAlgorithmFixture.java | 8 --------
.../encrypt/RewriteNormalEncryptAlgorithmFixture.java | 8 --------
.../RewriteQueryAssistedEncryptAlgorithmFixture.java | 8 --------
.../RewriteQueryLikeEncryptAlgorithmFixture.java | 8 --------
16 files changed, 13 insertions(+), 140 deletions(-)
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 e31936c0a2c..b7611f40fbf 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,8 +20,6 @@ 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.
*
@@ -38,12 +36,4 @@ 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 fd2e414389d..6568c0faa1a 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,31 +17,26 @@
package org.apache.shardingsphere.encrypt.algorithm.assisted;
-import lombok.Getter;
+import lombok.EqualsAndHashCode;
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;
/**
* MD5 assisted encrypt algorithm.
*/
+@EqualsAndHashCode
public final class MD5AssistedEncryptAlgorithm implements
AssistedEncryptAlgorithm<Object, String> {
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 2cb4fda1d25..b98345721b5 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,7 +18,7 @@
package org.apache.shardingsphere.encrypt.algorithm.like;
import com.google.common.base.Strings;
-import lombok.Getter;
+import lombok.EqualsAndHashCode;
import lombok.SneakyThrows;
import org.apache.shardingsphere.encrypt.api.encrypt.like.LikeEncryptAlgorithm;
import
org.apache.shardingsphere.encrypt.exception.algorithm.EncryptAlgorithmInitializationException;
@@ -27,7 +27,6 @@ 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;
@@ -37,6 +36,7 @@ import java.util.stream.IntStream;
/**
* Char digest like encrypt algorithm.
*/
+@EqualsAndHashCode
public final class CharDigestLikeEncryptAlgorithm implements
LikeEncryptAlgorithm<Object, String> {
private static final String DELTA_KEY = "delta";
@@ -55,9 +55,6 @@ 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;
@@ -72,7 +69,6 @@ public final class CharDigestLikeEncryptAlgorithm implements
LikeEncryptAlgorith
mask = createMask(props);
start = createStart(props);
charIndexes = createCharIndexes(props);
- this.props = createProps();
}
private int createDelta(final Properties props) {
@@ -129,15 +125,6 @@ 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 be79c4b22de..e18c60c5660 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,7 +18,7 @@
package org.apache.shardingsphere.encrypt.algorithm.standard;
import com.google.common.base.Strings;
-import lombok.Getter;
+import lombok.EqualsAndHashCode;
import lombok.SneakyThrows;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.codec.digest.MessageDigestAlgorithms;
@@ -37,21 +37,17 @@ 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.
*/
+@EqualsAndHashCode
public final class AESEncryptAlgorithm implements
StandardEncryptAlgorithm<Object, String> {
private static final String AES_KEY = "aes-key-value";
private static final String DIGEST_ALGORITHM_NAME =
"digest-algorithm-name";
- @Getter
- private Map<String, Object> props;
-
private byte[] secretKey;
@Override
@@ -64,17 +60,9 @@ 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 2cea9cd9766..c121aabb9b0 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,7 +17,7 @@
package org.apache.shardingsphere.encrypt.algorithm.standard;
-import lombok.Getter;
+import lombok.EqualsAndHashCode;
import org.apache.commons.codec.binary.Base64;
import org.apache.shardingsphere.encrypt.api.context.EncryptContext;
import
org.apache.shardingsphere.encrypt.api.encrypt.standard.StandardEncryptAlgorithm;
@@ -25,13 +25,12 @@ 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;
/**
* RC4 encrypt algorithm.
*/
+@EqualsAndHashCode
public final class RC4EncryptAlgorithm implements
StandardEncryptAlgorithm<Object, String> {
private static final String RC4_KEY = "rc4-key-value";
@@ -40,9 +39,6 @@ public final class RC4EncryptAlgorithm implements
StandardEncryptAlgorithm<Objec
private static final int SBOX_LENGTH = 256;
- @Getter
- private Map<String, Object> props;
-
private byte[] key;
@Override
@@ -54,7 +50,6 @@ 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/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/EncryptPredicateColumnTokenGenerator.java
b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/EncryptPredicateColumnTokenGenerator.java
index e78fa2e65aa..db91e18f35e 100644
---
a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/EncryptPredicateColumnTokenGenerator.java
+++
b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rewrite/token/generator/EncryptPredicateColumnTokenGenerator.java
@@ -121,7 +121,7 @@ public final class EncryptPredicateColumnTokenGenerator
implements CollectionSQL
if
(!leftColumnEncryptor.getType().equals(rightColumnEncryptor.getType())) {
return false;
}
- return
leftColumnEncryptor.getProps().equals(rightColumnEncryptor.getProps());
+ return leftColumnEncryptor.equals(rightColumnEncryptor);
}
return null == leftColumnEncryptor && null == rightColumnEncryptor;
}
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 4621c835366..dedd55e1164 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,9 +20,6 @@ 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
@@ -30,11 +27,6 @@ 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 94eb8a68cce..e1cb1138e4e 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,9 +20,6 @@ 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
@@ -30,11 +27,6 @@ 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 3a85f4115e3..f9bce86ec61 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,9 +20,6 @@ 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
@@ -30,11 +27,6 @@ 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 21900ee4fd9..c0d0b7065c8 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,7 +17,7 @@
package org.apache.shardingsphere.encrypt.sm.algorithm;
-import lombok.Getter;
+import lombok.EqualsAndHashCode;
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;
@@ -28,13 +28,12 @@ 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;
/**
* SM3 encrypt algorithm.
*/
+@EqualsAndHashCode
public final class SM3EncryptAlgorithm implements
StandardEncryptAlgorithm<Object, String> {
static {
@@ -45,15 +44,11 @@ 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 e40634cb31b..735bf795174 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,7 +17,7 @@
package org.apache.shardingsphere.encrypt.sm.algorithm;
-import lombok.Getter;
+import lombok.EqualsAndHashCode;
import lombok.SneakyThrows;
import
org.apache.shardingsphere.encrypt.api.encrypt.standard.StandardEncryptAlgorithm;
import
org.apache.shardingsphere.encrypt.exception.algorithm.EncryptAlgorithmInitializationException;
@@ -36,12 +36,11 @@ 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.
*/
+@EqualsAndHashCode
public final class SM4EncryptAlgorithm implements
StandardEncryptAlgorithm<Object, String> {
static {
@@ -64,9 +63,6 @@ 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;
@@ -80,7 +76,6 @@ 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) {
@@ -116,14 +111,6 @@ 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 40d7805db1e..7b88cb7af67 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,9 +20,6 @@ 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
@@ -30,11 +27,6 @@ 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 a9eb27fdc09..bcfc186e8c5 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,9 +20,6 @@ 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
@@ -30,11 +27,6 @@ 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 ce61aac5a66..8c6398531ac 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,9 +20,6 @@ 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
@@ -33,11 +30,6 @@ 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 2b2c439acc3..1381a68fe1c 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,9 +20,6 @@ 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
@@ -33,11 +30,6 @@ 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 702ce6d0f4b..2ab6a4dce13 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,9 +20,6 @@ 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
@@ -30,11 +27,6 @@ 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";