base64 encoding and decoding in C