Mercurial > libbase64
view README.md @ 32:c96f2b26678a
misc: general cleanups
- Remove C++ variant,
- Remove Doxygen,
- Improve README,
- Upgrade license years.
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 02 Jun 2021 15:59:46 +0200 |
parents | 436f5c3243bf |
children | 01c29bee0c54 |
line wrap: on
line source
libbase64 -- Base64 encoding and decoding ========================================= Introduction ------------ Base64 encoding and decoding easily in C99. Features -------- - base64 encoding, - base64 decoding (with base64url support), - no dynamic allocation required, Quick overview -------------- Encode data. We use -1 to read until end of input string. char encoded[128]; size_t size; size = b64_encode("Hello world!", -1, encoded, sizeof (encoded)); Decode data. As with previous example, we use -1 to read until enf of base64 input string. char decoded[128]; size_t size; size = b64_decode("ABx=", -1, decoded, sizeof (decoded)); Note: even with binary data the function `b64_decode` still append a NUL terminator. Use the return code from the function to get the size binary data.