Sample code for 30+ languages & platforms
Objective-C

Decode Base64

Demonstrates how to decode base64.

Chilkat Objective-C Downloads

Objective-C
#import <CkoBinData.h>
#import <NSString.h>

BOOL success = NO;

CkoBinData *bd = [[CkoBinData alloc] init];

//  Append a base64 string to bd.
success = [bd AppendEncoded: @"c2VjcmV0" encoding: @"base64"];

//  The bd now contains the decoded bytes.
//  Let's say it was a password string..
NSString *password = [bd GetString: @"utf-8"];

//  Decodes to "secret".
NSLog(@"%@%@",@"password = ",password);