Sample code for 30+ languages & platforms
Objective-C

Example: Crypt2.DecodeString method

Demonstrates how to call the DecodeString method.

Chilkat Objective-C Downloads

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

CkoCrypt2 *crypt2 = [[CkoCrypt2 alloc] init];

//  The string "Hello World" in base64 (using the utf-8 byte representation) is "SGVsbG8gV29ybGQ="

NSString *encodedStr = @"SGVsbG8gV29ybGQ=";
NSString *encoding = @"base64";
NSString *charset = @"utf-8";

NSString *str = [crypt2 DecodeString: encodedStr charset: charset encoding: encoding];
NSLog(@"%@",str);

//  Output is "Hello World"