CS-14826, CS-14996: fix the md5 checksum

Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/6618101d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/6618101d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/6618101d

Branch: refs/heads/3.0.x
Commit: 6618101d5a8dc481931a44d072df37513cf82a05
Parents: b66873d
Author: Edison Su <[email protected]>
Authored: Thu May 24 15:07:17 2012 -0700
Committer: Edison Su <[email protected]>
Committed: Thu May 24 15:07:32 2012 -0700

----------------------------------------------------------------------
 .../storage/template/DownloadManagerImpl.java      |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6618101d/core/src/com/cloud/storage/template/DownloadManagerImpl.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/template/DownloadManagerImpl.java 
b/core/src/com/cloud/storage/template/DownloadManagerImpl.java
index 4f01842..b9fc038 100755
--- a/core/src/com/cloud/storage/template/DownloadManagerImpl.java
+++ b/core/src/com/cloud/storage/template/DownloadManagerImpl.java
@@ -293,7 +293,7 @@ public class DownloadManagerImpl implements DownloadManager 
{
             }       
             byte[] md5sum = digest.digest();
             BigInteger bigInt = new BigInteger(1, md5sum);
-            checksum = bigInt.toString(16);
+            checksum = String.format("%032x",bigInt.toString(16));
             return checksum;
         }catch(IOException e) {
                return null;

Reply via email to