Skip to content
superwills edited this page Apr 17, 2013 · 6 revisions

How to use Nibble And A Half

All you need is to #include "base64.h" into your C or C++ project.

Encoding is:

int encodedAsciiLen ;
char* encodedAscii = base64( yourBinaryData, binaryDataLen, &encodedAsciiLen ) ;

Decoding is:

int decodedLen ;
unsigned char* binaryData = unbase64( encodedAscii, encodedAsciiLen, &decodedLen ) ;

Don't forget to free( encodedAscii ) and free( binaryData ) when you are done!

free( encodedAscii ) ;
free( binaryData ) ;

You do not need to import the unit tests.

Nibble And A Half is released under the zlib license.