justbk2015 commented on a change in pull request #11440:
URL: https://github.com/apache/shardingsphere/pull/11440#discussion_r676235585



##########
File path: 
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/user/ShardingSphereUser.java
##########
@@ -35,4 +36,18 @@ public ShardingSphereUser(final String username, final 
String password, final St
         grantee = new Grantee(username, hostname);
         this.password = password;
     }
+
+    /**
+     * get decrypt password.
+     * @return String the decrypt password
+     */
+    public String getPassword() {
+        try {
+            return 
AlgorithmSecureFactory.getInstance().decryptFrontend(password);
+            // CHECKSTYLE:OFF
+        } catch (Exception e) {
+            //checkstyle:ON
+            return null;

Review comment:
       when password encrypt or decrypt algorithm run failed, then throught 
exception cause return null.




-- 
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