Skip navigation

Issues with commomcrypto.

182 Views 1 Reply Latest reply: Jan 22, 2013 7:38 PM by FelipeV RSS
mops_v Calculating status...
Currently Being Moderated
Jan 22, 2013 5:18 PM

Hi, I am having few issues with commomcrypto 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?

  • FelipeV Level 5 Level 5 (4,335 points)
    Currently Being Moderated
    Jan 22, 2013 7:38 PM (in response to mops_v)

    Whats missing is that you are posting in the wrong forum. Post in the Developer Forum; this is the iPhone forum.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.