I have encrypted NSData using the code posted in Any cocoa source code for AES encryption decryption? (Answered by Rob Keniger). Now I need to check the encryption is correct or not. For that I converted encrypted NSData to NSString, using the code
NSString *string=[[NSString alloc]initWithBytes:[cipherData bytes] length:[cipherData length] encoding:NSUTF8StringEncoding];
but when NSLog ed, it shows (null). My doubt is does the crypt() function encrypt data in different encoding rather than NSUTF8StringEncoding?