HomePhabricator
Diffusion Comm de5bbb31d640

[native] Add base64 decode to CommUtilsModule

Description

[native] Add base64 decode to CommUtilsModule

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=

Reviewers: kamil, marcin

Reviewed By: kamil

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D7760

Details

Provenance
bartekAuthored on May 3 2023, 2:26 AM
Reviewer
kamil
Differential Revision
D7760: [native] Add base64 decode to CommUtilsModule
Parents
rCOMM0d7e1448bd31: [native] Add C++ function to decode base64
Branches
Unknown
Tags
Unknown