base64 encode typescript