Updated base64 encoder