Skip to content

Commit 847e80b

Browse files
committed
🐛 Fix Android Base64 format
Before this fix, on the Android platform, arrays returned would have the last byte zeroed out when requesting `3n - 1` number of bytes.
1 parent d2a10c1 commit 847e80b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ public String getRandomBase64(int byteLength) throws NoSuchAlgorithmException {
3131

3232
random.nextBytes(data);
3333

34-
return Base64.encodeToString(data, Base64.DEFAULT);
34+
return Base64.encodeToString(data, Base64.NO_WRAP);
3535
}
3636
}

0 commit comments

Comments
 (0)