Page MenuHomePhabricator

[native] Add base64 decode to CommUtilsModule
ClosedPublic

Authored by bartek on May 9 2023, 6:20 AM.
Tags
None
Referenced Files
F1439907: D7760.id26595.diff
Thu, Mar 28, 9:02 PM
F1439903: D7760.id26579.diff
Thu, Mar 28, 9:02 PM
F1439902: D7760.id26311.diff
Thu, Mar 28, 9:02 PM
F1439900: D7760.id26300.diff
Thu, Mar 28, 9:02 PM
F1439880: D7760.id.diff
Thu, Mar 28, 9:01 PM
F1439865: D7760.diff
Thu, Mar 28, 8:53 PM
Unknown Object (File)
Sun, Mar 3, 4:23 AM
Unknown Object (File)
Sat, Mar 2, 7:56 PM
Subscribers

Details

Summary

This adds JSI bindings for D7758 to the native CommUtilsModule.

Depends on D7758.

Test Plan

Encoded and decoded a Uint8Array into base64, using commCoreModule.base64{Encode,Decode}buffer() and console-log.

Used three different length of Uint8Arrays to test all padding values, e.g.:

new Uint8Array([1,2,3,4,5,6]);  // AQIDBAUG
new Uint8Array([1,2,3,4,5,6,7]); // AQIDBAUGBw==
new Uint8Array([1,2,3,4,5,6,7,8]); // AQIDBAUGBwg=

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.May 9 2023, 8:15 AM

Could you make sure in Test Plan that you tested decoding strings with each length of padding at the end (none, =, and ==)?

This revision is now accepted and ready to land.May 15 2023, 2:21 AM