I am using a Pre-Populated SQLite Database with Core Data.
My problem is that i want to encrypt sqlite database file generated by Core Data
Data protection is a feature available for iOS 4 devices that offer hardware encryption: iPhone 4, iPhone 3GS, iPod touch (3rd generation or later), and all iPad models. This article outlines how to enable and verify data protection.
http://support.apple.com/kb/HT4175
Hope this helps
Apple includes support for its CommonCrypto library in iOS, and has a sample code project to demonstrate use of asymmetric and symmetric encryption/decryption.
Which approach you take depends on how you intend to secure the data; a symmetric approach could require storing the key in the application, which reduces security somewhat. But the sample code should get you started, either way.
Data Protection:
Data protection is a feature available for iOS 4 devices that offer hardware encryption: iPhone 4, iPhone 3GS, iPod touch (3rd generation or later), and all iPad models. This article outlines how to enable and verify data protection.
http://support.apple.com/kb/HT4175
Link to apple article from way back machine as original link is removed
Apple developer blog describing functional part of NSFileProtectionComplete.
“NSFileProtectionComplete
The file is stored in an encrypted format on disk and cannot be read from or written to while the device is locked or booting.”