complete base64 encoding and decoding