iphone encryption not working -


I have this encryption / decryption and no error, but I am unable to decrypt the data and I'm sure Not sure if the data is encrypted, please help.

  - (NSDTA *) AES 256 EncryptWith: (nssting *) key {four keypets [KCC sage 256 + 1]; Berboo (keypets, keyboards); [Key getCString: keyPtr maxLength: sizeof (keyPtr) encoding: NSUTF8StringEncoding]; NSUntengar database [= Strenda Length]; Data = [[NSData alloc] init]; Data = [strandata data utilizing encoding: NSUFF 8 string encoding]; Size_t BufferSecurity = DataLanguage + KCCBlockSizeAES128; Zero * Subfiffer = Molok (buffer size); Size_t numBytesEncrypted = 0; CCCryptorStatus cryptStatus = CCCrypt (kCCEncrypt, kCCAlgorithmAES128, kCCOptionPKCS7Padding, keyPtr, kCCKeySizeAES256, NULL / * Initial Vector (optional) * /, [data bytes], dateleng, / * input * / [data bytes], buffers, / * output * / & Amp; numBytesEncrypted); If (cryptStatus == kCCSuccess) {return [copy of NSData datvitbits: data length: numBytesEncrypted]; }}  

has a decryption:

  - (NSDT * *) AES 256 decrypt wiki: (nssting *) key and forwardadata: (NSDT *) ozagatataabaj {char Insect [kCCKeySizeAES256 + 1]; Berboo (keypets, keyboards); [Key getCString: keyPtr maxLength: sizeof (keyPtr) encoding: NSUTF8StringEncoding]; NSUInteger datalambium = [obzetabobase length]; Size_t BufferSecurity = DataLanguage + KCCBlockSizeAES128; Zero * buffer = molok (buffer size); Size_t numBytesDecrypted = 0; CCCryptorStatus cryptStatus = CCCrypt (kCCDecrypt, kccAlgorithmAES128, kCCOptionPKCS7 Padding, Kepet, KCC SEES 256, Faucet, [Objetaobject bytes], Datelenda, [ObjectDataobject bytes], buffer size, and amp; numbytesDecrypted); If (cryptStatus == kCCSuccess) {Returns [NSDT DataWithtes Copy: OZDataObise Length: numBytesDecrypted]; }  

}

I call the above methods:

  crypto * obj = [crypto new]; NSData * objData = [obj AES256EncryptWithKey: @ "hell"]; NSDTa * Val = [obj AES 256 decrypt Witches: @ "hell" and Foradata: ozdatta]; NSLog (@ "Decrypted string is:% @ and langth is% d", [val description], [val length]);  

The decryption is not at all and encryption - I am not sure about it, please help me here.

I have learned it by myself,

A complete implementation that is near- Pass Ccits can be:

Thanks everyone.


Comments