(Objective-C) Example: Crypt2.AddPfxSourceBd method
Demonstrates how to call the AddPfxSourceBd method.
#import <CkoCrypt2.h>
#import <CkoBinData.h>
#import <NSString.h>
CkoCrypt2 *crypt = [[CkoCrypt2 alloc] init];
BOOL success = NO;
// Do public-key decryption (RSA)
crypt.CryptAlgorithm = @"pki";
// ...
// ...
// ...
CkoBinData *bdPfx = [[CkoBinData alloc] init];
success = [bdPfx LoadFile: @"c:/my_pfx_files/a.pfx"];
// ...
NSString *pfxPassword = @"secret1";
success = [crypt AddPfxSourceBd: bdPfx password: pfxPassword];
if (success == NO) {
NSLog(@"%@",crypt.LastErrorText);
return;
}
// Add as many as PFX sources as desired...
success = [bdPfx LoadFile: @"c:/my_pfx_files/b.pfx"];
pfxPassword = @"secret2";
success = [crypt AddPfxSourceBd: bdPfx password: pfxPassword];
if (success == NO) {
NSLog(@"%@",crypt.LastErrorText);
return;
}
// ...
// ...
|