woofyzhao commented on code in PR #4795:
URL: https://github.com/apache/inlong/pull/4795#discussion_r910537637


##########
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/example/UdpClientExample.java:
##########
@@ -92,6 +92,16 @@ public static void main(String[] args) {
         }
     }
 
+    public static String getRandomString(int length) {
+        StringBuffer sb = new StringBuffer();
+        String string = "i am bus test client!";
+        for (int i = 0; i < length; i++) {
+            int number = new Random().nextInt(string.length());
+            sb.append(string.charAt(number));
+        }
+        return sb.toString();
+    }
+

Review Comment:
   changed to SecureRandom



##########
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/codec/ProtocolEncoder.java:
##########
@@ -287,8 +288,8 @@ private ByteBuf writeToBuf5(EncodeObject object) {
                         EncryptInfo encryptInfo = 
encryptEntry.getRsaEncryptInfo();
                         msgAttrs = msgAttrs + "_userName=" + 
object.getUserName()
                                 + "&_encyVersion=" + encryptInfo.getVersion()
-                                + "&_encyDesKey=" + 
encryptInfo.getRsaEncryptedKey();
-                        body = EncryptUtil.desEncrypt(body, 
encryptInfo.getDesKey());
+                                + "&_encyAesKey=" + 
encryptInfo.getRsaEncryptedKey();
+                        body = EncryptUtil.aesEncrypt(body, 
encryptInfo.getDesKey());

Review Comment:
   fixed



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to