You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "strawberry-crisis (via GitHub)" <gi...@apache.org> on 2023/04/17 03:15:11 UTC
[GitHub] [shardingsphere] strawberry-crisis commented on a diff in pull request #25009: Improve properties verification of EncryptAlgorithm
strawberry-crisis commented on code in PR #25009:
URL: https://github.com/apache/shardingsphere/pull/25009#discussion_r1168117866
##########
features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/encrypt/RC4EncryptAlgorithm.java:
##########
@@ -30,27 +31,26 @@
* RC4 encrypt algorithm.
*/
public final class RC4EncryptAlgorithm implements StandardEncryptAlgorithm<Object, String> {
-
+
private static final String RC4_KEY = "rc4-key-value";
-
+
private static final int SBOX_LENGTH = 256;
-
+
private static final int KEY_MIN_LENGTH = 5;
-
+
private volatile byte[] key = new byte[SBOX_LENGTH - 1];
-
+
private volatile int[] sBox = new int[SBOX_LENGTH];
-
+
@Override
public void init(final Properties props) {
reset();
setKey(props.getProperty(RC4_KEY, "").getBytes(StandardCharsets.UTF_8));
}
-
+
Review Comment:
OK, I'll fix it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org