Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 86402cf

Browse files
committed
Merge pull request #222 from Microsoft/change-hash-encoding
Change hash encoding
2 parents 51c8bea + 9689981 commit 86402cf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.microsoft.codepush.react;
22

33
import android.app.Activity;
4-
import android.util.Base64;
54

65
import com.facebook.react.bridge.ReadableArray;
76
import com.facebook.react.bridge.WritableMap;
@@ -64,7 +63,7 @@ private static String computeHash(InputStream dataStream) {
6463
}
6564

6665
byte[] hash = messageDigest.digest();
67-
return Base64.encodeToString(hash, 0, hash.length, 0);
66+
return String.format("%064x", new java.math.BigInteger(1, hash));
6867
}
6968

7069
public static void copyNecessaryFilesFromCurrentPackage(String diffManifestFilePath, String currentPackageFolderPath, String newPackageFolderPath) throws IOException{

0 commit comments

Comments
 (0)