craftzdog / craftzdog/react-native-quick-base64
toBase64 results differ from js-base64
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 464
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
I have run the same byte arrays through js-base64 and cpp64 with those results:
LOG [82, 235, 19, 104, 164, 2, 214, 83, 201, 109, 220, 113, 198, 127, 246, 41, 43, 88, 224, 70, 83, 8, 70, 37, 84, 13, 192, 247, 128, 225, 4, 94]
LOG cpp64: UusTaKQC1lPJbdxxxn/2KStY4EZTCEYlVA3A94DhBF4=
LOG jsb64: UusTaKQC1lPJbdxxxn/2KStY4EZTCEYlVA3A94DhBF4=
LOG [11, 80, 135, 209, 171, 28, 64, 255, 39, 210, 24, 201, 226, 41, 153, 223, 120, 249, 81, 218, 135, 69, 207, 111]
LOG cpp64: C1CH0ascQP8n0hjJ4imZ33j5UdqHRc9v
LOG jsb64: C1CH0ascQP8n0hjJ4imZ33j5UdqHRc9v
LOG [184, 179, 212, 210, 19, 142, 29, 203, 166, 118, 216, 245, 113, 162, 222, 115]
LOG cpp64: AAAAAAAAAAAAAAAAAAAAALiz1NITjh3LpnbY9XGi3nM=
LOG jsb64: uLPU0hOOHcumdtj1caLecw==
The A padding on the last tuple is wrong..
Any idea what could be wrong?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the toBase64 entry point and reproduce the third byte-array example, comparing cpp64 with js-base64. The fix is complete when the third result no longer contains the incorrect A padding and the other reported examples still match.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100