Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace tweetnacl-util Base64 functions with StableLib #27

Merged
merged 3 commits into from
May 29, 2020

Conversation

mantariksh
Copy link
Contributor

@mantariksh mantariksh commented May 28, 2020

Problem

encode/decodeBase64 and encode/decodeUTF8 from tweetnacl-util are unstable for large payloads.

Closes #26

Solution

Use encode and decode from StableLib instead. Note that for UTF8, all the encode/decode functions had to be swapped because the function signatures in StableLib are the opposite of those in tweetnacl-util.

Copy link
Contributor

@liangyuanruo liangyuanruo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm, but could we remove the reliance on tweetnacl-util entirely as recommended, by also porting the UTF8 encode/decode functions? issue should have been clearer, apologies.

Note that all encode/decode functions had to be swapped because the
encode/decode function signatures for StableLib are the opposite of those
in tweetnacl-util.
@liangyuanruo liangyuanruo merged commit 2dbce2d into master May 29, 2020
@liangyuanruo liangyuanruo deleted the base64-stablelib branch May 29, 2020 09:15
liangyuanruo added a commit that referenced this pull request Jun 4, 2020
liangyuanruo added a commit that referenced this pull request Jun 4, 2020
* Revert "Replace tweetnacl-util with StableLib (#27)"

This reverts commit 2dbce2d.

* Add tests for multi-language plaintext with non-UTF8 characters

* 0.8.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace tweetnacl-util with StableLib
2 participants