For iOS only static libraries can be used, not frameworks with dynamic libraries.
Instead use CommonCrypto, it is plain C but not really hard to use. Do insure that you use all the same setting, mode, IV (if necessary for the mode), padding and key.
Add the Security.framework
to the project
#import <CommonCrypto/CommonCryptor.h>
+ (NSData *)doCipher:(NSData *)dataIn
iv:(NSData *)iv
key:(NSData *)symmetricKey
context:(CCOperation)encryptOrDecrypt
{
CCCryptorStatus ccStatus = kCCSuccess;
size_t cryptBytes = 0; // Number of bytes moved to buffer.
NSMutableData *dataOut = [NSMutableData dataWithLength:dataIn.length + kCCBlockSizeAES256];
ccStatus = CCCrypt( encryptOrDecrypt,
kCCAlgorithmAES256,
kCCOptionPKCS7Padding,
symmetricKey.bytes,
kCCKeySizeAES256,
iv.bytes,
dataIn.bytes,
dataIn.length,
dataOut.mutableBytes,
dataOut.length,
&cryptBytes);
if (ccStatus != kCCSuccess) {
// Handle error
NSLog(@"CCCrypt status: %d", ccStatus);
}
dataOut.length = cryptBytes;
return dataOut;
}
For Base64 see: SO answer