Base-64 decode (was Property List Editor)
Base-64 decode (was Property List Editor)
- Subject: Base-64 decode (was Property List Editor)
- From: Graham Jones <email@hidden>
- Date: Wed, 08 Jun 2005 12:49:19 -0400
Hi Dave,
Thanks again for the quick response. Boy, you'd think there was an easier
way, like an existing Objective-C method or shell script, given that this is
Apple's standard encoding for data in plist files.
I tried downloading the extensions for the method you found ( Kyla's page at
http://www.cpinternet.com/~em002400/CocoaProgramming.html ) but I am having
trouble getting them to work in my Applescript Studio app.
Do you (or anyone else) know of an easier way to decode Base-64, or how I
can get these to work in AS Studio?
I really appreciate your help.
Many thanks,
Graham Jones.
On 6/8/05 10:48 AM, "Dave" wrote:
> A quick search on Google found this page:
>
> http://www.cocoabuilder.com/archive/message/cocoa/2004/2/10/96667
>
> Here's the base 64 Decode method it has:
>
> + (NSString *)decode:(NSString *)string
> {
> NSData *dataObj = [ NSData dataWithBase64EncodedString:string ];
> NSString *result = [ [ NSString alloc ] initWithData:dataObj
> encoding:NSASCIIStringEncoding ];
> // Can use ASCII string encoding here because Base64 is all ASCII
> data.
>
> return [ result autorelease ];
> }
>
> HTH!
>
> Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden