You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/06/29 11:49:37 UTC

[GitHub] [inlong] woofyzhao commented on a diff in pull request #4795: [INLONG-4790][SDK] Upgrade DES encryption decryption to AES

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


##########
inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/config/EncryptConfigEntry.java:
##########
@@ -99,20 +108,20 @@ public EncryptInfo getRsaEncryptInfo() {
         synchronized (this.lastUpdateTime) {
             if (visitTime == this.lastUpdateTime.get()) {
                 RSAPublicKey rsaKey = EncryptUtil.loadPublicKeyByText(pubKey);
-                this.desKey = EncryptUtil.generateDesKey();
+                this.aesKey = EncryptUtil.generateAesKey();
                 try {
-                    byte[] encryptedKey = EncryptUtil.rsaEncrypt(rsaKey, this.desKey);
+                    byte[] encryptedKey = EncryptUtil.rsaEncrypt(rsaKey, this.aesKey);
                     String tmpKey = Base64.encodeBase64String(encryptedKey);
                     rsaEncryptedKey = URLEncoder.encode(tmpKey, "utf8");
                     this.lastUpdateTime.set(System.currentTimeMillis());
-                    return new EncryptInfo(this.version, this.rsaEncryptedKey, this.desKey);
+                    return new EncryptInfo(this.version, this.rsaEncryptedKey, this.aesKey);

Review Comment:
   Looking into that in future PRs.



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org