Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 06-18-2009, 01:12 PM   #2 (permalink)
smasher
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
Default

Quote:
Originally Posted by aryaxt View Post
I am getting Base64 encoded text from the server.
I need to decode it
"KG9ic2VydmVyKSBoZWxsbw=="
which should be decoded to
"(observer) hello"

Can somebody tell me how I should decode and encode base64? I searched it on google i found nothing. I don't even need the code. I just need to know the logic, and i'll wirte the code myself.
Is there any library in the sdk that allows me to do this?
There's a category (an extension to a class) for base64 encoding at the bottom of this page:
CocoaDev: BaseSixtyFour

If you use it, you can decode any string with

NSData* mydata = [NSData dataWithBase64EncodedString: yourString];

I've tried it, it works.
__________________

Free Games!
smasher is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,836
Threads: 89,209
Posts: 380,644
Top Poster: BrianSlick (7,129)
Welcome to our newest member, abbylowin
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:46 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.