Implement the base64 encode/decode