• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Base64 encoding on Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Base64 encoding on Leopard


  • Subject: Base64 encoding on Leopard
  • From: Jaime Magiera <email@hidden>
  • Date: Mon, 19 Nov 2007 21:06:30 -0500

Hello folks,

I'm just now dipping my foot into the water of network programming at this level (with some previous experience with Java networking and writing a few small tools). I recently inherited a project that utilizes Greg Huland's "Connection.framework". Eventually, I'd like to transition the project to plain-vanilla code. However, that's going to take some time. So, at the moment, we have to rely on this framework, which hasn't been updated in over year. Apparently, the framework utilizes Curl_base64_encode() to encode the payload. This call is causing a crash on Leopard, which leads me to a few questions...

- Has anyone experienced problems with this call on Leopard? It works fine on Tiger.

- What are other folks using to get Base64 data? It seems like relying on the Curl library is less than optimal.

Since Greg's project hasn't been updated in a while, I thought I'd figure out a fix and send it to him.

Below is the method in question.

thanks for any info,

Jaime

- (NSString *)base64Encoding
{
const char *buffer = (const char *)[self bytes];
size_t size = [self length];
char *dest = nil;

size_t new_size = Curl_base64_encode(buffer, size, &dest);
NSString *result = [[[NSString alloc] initWithBytesNoCopy:dest length:new_size encoding:NSASCIIStringEncoding freeWhenDone:YES] autorelease];
return result;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Base64 encoding on Leopard
      • From: Quinn <email@hidden>
  • Prev by Date: Re: NSURLConnection crashes on Leopard
  • Next by Date: Why is Leopard annoying my users?
  • Previous by thread: OpenTransport leaking sockets on 10.5
  • Next by thread: Re: Base64 encoding on Leopard
  • Index(es):
    • Date
    • Thread