Encode input with Base64