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

Need C implementations of btoa and atob #8

Open
mlite opened this issue Mar 31, 2021 · 3 comments
Open

Need C implementations of btoa and atob #8

mlite opened this issue Mar 31, 2021 · 3 comments
Assignees

Comments

@mlite
Copy link
Contributor

mlite commented Mar 31, 2021

function atob(, s: string): string

Decodes a string of data which has been encoded using base-64 encoding.

console.log(atob("aGVsbG8gd29ybGQ=")); // outputs 'hello world'

function btoa(, s: string): string

Creates a base-64 ASCII encoded string from the input string.

console.log(btoa("hello world"));  // outputs "aGVsbG8gd29ybGQ="
@mlite mlite changed the title Need C implementation of btoa and atob Need C implementations of btoa and atob Mar 31, 2021
@mlite mlite self-assigned this Mar 31, 2021
@mlite mlite assigned lcsmuller and unassigned mlite May 22, 2021
@mlite
Copy link
Contributor Author

mlite commented May 22, 2021

This one should be compatible with our license:
http://web.mit.edu/freebsd/head/contrib/wpa/src/utils/base64.c

We just need to extract it and add it's license.

@mlite
Copy link
Contributor Author

mlite commented May 22, 2021

This code should be added to the cee-utils repo.

@mlite
Copy link
Contributor Author

mlite commented May 22, 2021

This SO thread has benchmark different base64 implementations. https://stackoverflow.com/questions/342409/how-do-i-base64-encode-decode-in-c

@lcsmuller lcsmuller transferred this issue from cee-studio/orca Jul 2, 2021
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

No branches or pull requests

2 participants