• 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
Re: base64 NSData to NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: base64 NSData to NSString


  • Subject: Re: base64 NSData to NSString
  • From: Jeff LaMarche <email@hidden>
  • Date: Sat, 22 Mar 2008 14:18:30 -0400

I really wouldn't do it this way. There are many ways of doing this within your app without spawning a task. LibCrypto offers functions for encoding and decoding Base64 as does LibSSL (which is going to be the same code as you're currently trying to use, but without spawning a task). There are also several categories on NSData floating around out there that will allow you to decode and encode Base64 right in your application, some of which are very well tested.

You can find some good discussion on the topic here:

http://www.cocoadev.com/index.pl?BaseSixtyFour

The category from Colloquy that is discussed has moved to a new location. You can find it at its new location here:

http://colloquy.info/project/browser/trunk/Additions/NSBundleAdditions.h
http://colloquy.info/project/browser/trunk/Additions/NSBundleAdditions.m

HTH
Jeff


On Mar 22, 2008, at 1:22 PM, Marco Cassinerio wrote:

i'm trying to read the com.apple.recentitems.plist file and i found that "Alias" and "Icon" key are base64 NSData object.
NSData and NSString don't provide methods to manage base64 data.
I've searched with Google and i found some "pathces" for NSString and NSData but they don' t seem to work.
I've also tried to write NSData object content to file and pass it to openssl command from bash:


openssl base64 -d -in in.txt -out out.txt

but it always create a blank file.

Any suggestions?

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: base64 NSData to NSString
      • From: Marco Cassinerio <email@hidden>
References: 
 >base64 NSData to NSString (From: Marco Cassinerio <email@hidden>)

  • Prev by Date: Re: base64 NSData to NSString
  • Next by Date: Re: Changing properties inside a relationship entity
  • Previous by thread: base64 NSData to NSString
  • Next by thread: Re: base64 NSData to NSString
  • Index(es):
    • Date
    • Thread