Sample code for 30+ languages & platforms
Objective-C

Transition from Crypt2.Decode to BinData.AppendEncoded

Provides instructions for replacing deprecated Decode method calls with AppendEncoded.

Chilkat Objective-C Downloads

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

BOOL success = NO;

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

//  ...
//  ...
NSData byteData;
NSString *encoding = @"base64";

//  ------------------------------------------------------------------------
//  The Decode method is deprecated:
byteData = [crypt2 Decode: @"ENCODED_DATA..." encoding: encoding];

//  ------------------------------------------------------------------------
//  Do the equivalent using BinData.AppendEncoded.

CkoBinData *bd = [[CkoBinData alloc] init];
success = [bd AppendEncoded: @"ENCODED_DATA..." encoding: encoding];
byteData = [bd GetData];