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

How big should be the destination buffer? #2

Open
marcobambini opened this issue Sep 17, 2021 · 0 comments
Open

How big should be the destination buffer? #2

marcobambini opened this issue Sep 17, 2021 · 0 comments

Comments

@marcobambini
Copy link

marcobambini commented Sep 17, 2021

Thanks for this very well written library!

In the char* bintob64( char* dest, void const* src, size_t size ); API, can you please specify how big dest should be (starting from size_t size)?

As far as I know, dest size should be at least: size_t destsize = ((size + 3 - (size % 3)) / 3) * 4;

Please note that a macro/function that computes that value, would be a very nice addition.

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

1 participant