title: How to use Data Protection with Core Data?
body: <p>I'm developing an iOS 7 and above app that uses <code>Core Data</code>, and I was given the requirement of encrypting the persisted data. I'm using an <code>SQLite</code> database behind the scenes.</p>
  
  <p>I've been reading about <code>Data Protection</code> feature in <a href="https://developer.apple.com/library/ios/documentation/Miscellaneous/Conceptual/iPhoneOSTechOverview/CoreServicesLayer/CoreServicesLayer.html#//apple_ref/doc/uid/TP40007898-CH10-SW29" rel="nofollow">iOS Technology Overview</a> and <a href="https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/StrategiesforImplementingYourApp/StrategiesforImplementingYourApp.html#//apple_ref/doc/uid/TP40007072-CH5-SW21" rel="nofollow">App Programming Guide for iOS</a>, but I'm not sure if it can be used with <code>Core Data</code> to encrypt the <code>SQLite</code> file... can it? How?</p>
  
  <p>If using <code>Data Protection</code> with <code>Core Data</code> is possible, would that meet the requirement of encrypting the stored data? I mean, would it be enough? I've also found that there are some third-parties dealing with <code>SQLite</code> data encryption such as <a href="https://www.zetetic.net/sqlcipher/ios-tutorial/" rel="nofollow">SQLCipher</a>. Should I integrate one of this kind of third-parties?</p>
  
  <p>Thanks in advance</p>