cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Base64 encode and decode

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 20 Jan 2011 11:42:31 -0800

On Thu, Jan 20, 2011 at 02:21:54PM -0500, amit paliwal wrote:
> As Curl provides many useful options to set with curl_easy_perform(), but
> I don't see any option that takes whether we want to apply Base64 encoding and
> decoding or not. There are API's available, which I can use from my application
> code directly, API's are:
>
> Curl_base64_encode()
> Curl_base64_decode()
>
> Do I need to use them explicitly, or there is some other way of using it too.

libcurl base64-encodes control data in a few places automatically when
required (e.g. for Basic authentication), but it won't encode data. If your
application requires base64-encoded data, it will need to be so encoded in the
app. And those two functions are not actually part of the libcurl API, so
they aren't even available for use in apps, anyway.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-01-20