Skip to content

Commit b1e08e4

Browse files
committed
URGENT FIX: SHA hashing broken on Android for UTF8
1 parent 3eab42a commit b1e08e4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

android/src/main/java/com/pedrouid/crypto/RCTSha.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void shaBase64(String data, String algorithm, Promise promise) throws Exc
8686
@ReactMethod
8787
public void shaUtf8(String data, String algorithm, Promise promise) throws Exception {
8888
try {
89-
byte[] digest = data.getBytes();
89+
byte[] digest = this.sha(data.getBytes(), algorithm);
9090
promise.resolve(Base64.encodeToString(digest, Base64.DEFAULT));
9191
} catch (Exception e) {
9292
promise.reject("-1", e.getMessage());

0 commit comments

Comments
 (0)