Base 64 encoding decoding implementation in C++