CommonCrypto issue on ios

Hi,

I am having few issues with commoncrypto api. I am using commoncrypto api for aes-ctr encryption/decryption. I am creating a commoncrypto object with the below code


CCCryptorStatus status = CCCryptorCreateWithMode(kCCDecrypt, kCCModeCTR, kCCAlgorithmAES128, ccNoPadding,

iv->bytes, key->bytes, key->len, NULL, 0, 0, kCCModeOptionCTR_BE, &cryptor);

then

status = CCCryptorUpdate(cryptor, inputData, len, ptr,remainingBytes,&movedBytes);

ptr += movedBytes;

remainingBytes -= movedBytes;

totalBytesWritten += movedBytes;

status = CCCryptorFinal(cryptor,

ptr,

remainingBytes,

&movedBytes

);


Initially I had few memory issues with my code, to resolve those issue I have enabeld " Guard malloc", "Enable Scribble", "Enable Guard Edges". With these setting enabled my app is working as expected on the simulator, however when I disable the above setting, Encryption and decryption are not working as expected.

Any ideas what I am I missing here?

iPhone 5, iOS 6

Posted on Jan 22, 2013 8:24 PM

Reply
3 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

CommonCrypto issue on ios

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.