Add base64 encoding and decoding and tests.