From 96899816926776eac7df2996cdb7d0de2e78b46b Mon Sep 17 00:00:00 2001 From: Geoffrey Goh Date: Tue, 1 Mar 2016 18:32:39 -0800 Subject: [PATCH] Change hash encoding --- .../java/com/microsoft/codepush/react/CodePushUpdateUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java b/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java index 330d175..f30e188 100644 --- a/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java +++ b/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java @@ -1,7 +1,6 @@ package com.microsoft.codepush.react; import android.app.Activity; -import android.util.Base64; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.bridge.WritableMap; @@ -64,7 +63,7 @@ public class CodePushUpdateUtils { } byte[] hash = messageDigest.digest(); - return Base64.encodeToString(hash, 0, hash.length, 0); + return String.format("%064x", new java.math.BigInteger(1, hash)); } public static void copyNecessaryFilesFromCurrentPackage(String diffManifestFilePath, String currentPackageFolderPath, String newPackageFolderPath) throws IOException{