Skip to content

Commit 35f589d

Browse files
committed
🐛 Fix Android compatibility
1 parent 9ec7788 commit 35f589d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

android/src/main/java/org/linusu/RNGetRandomValuesModule.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ public String getName() {
2727
@ReactMethod(isBlockingSynchronousMethod = true)
2828
public String getRandomBase64(int byteLength) throws NoSuchAlgorithmException {
2929
byte[] data = new byte[byteLength];
30+
SecureRandom random = new SecureRandom();
3031

31-
SecureRandom.getInstanceStrong().nextBytes(data);
32+
random.nextBytes(data);
3233

3334
return Base64.encodeToString(data, Base64.DEFAULT);
3435
}

0 commit comments

Comments
 (0)