weizhouapache commented on code in PR #12165:
URL: https://github.com/apache/cloudstack/pull/12165#discussion_r2694003572


##########
utils/src/main/java/org/apache/cloudstack/utils/security/DigestHelper.java:
##########
@@ -142,4 +142,18 @@ public static String calculateChecksum(File file) {
             throw new CloudRuntimeException(errMsg, e);
         }
     }
+
+    public static String prependAlgorithm(String checksum) {
+        if (StringUtils.isEmpty(checksum)) {
+            return checksum;
+        }
+        int checksumLength = checksum.length();
+        for (Map.Entry<String, Integer> entry : paddingLengths.entrySet()) {

Review Comment:
   ```suggestion
           Map<String, Integer> paddingLengths = getChecksumLengthsMap();
           for (Map.Entry<String, Integer> entry : paddingLengths.entrySet()) {
   ```



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