title: Protect iOS Database information
body: <p>I am busy writing a commercial electronic words-dictionary type of app for iPhone and iPad iOS7.  The value of the app is really in the database that I worked many years on, and not so much the app itself. The database is very large (195mb on a windows computer before converted to something like SQLLite) and I and would like to know what is the best way to protect the data in it so the app can read it but other people cannot read/get to it. It seems most mobile developers use SQLLite, but the data can easily be read with a normal hex editor on it. </p>
  
  <p>From this forum and others I gathered that SQLCipher is a good tool. My problem is that it SEEMS that SQLCipher encrypts the database, and then decrypts it when it needs to be read in a temporary file and then encrypt it again afterwards. If this is the case, I have two problems. </p>
  
  <ol>
  <li>The database is very large and to decrypt it every time and encrypt again is going to make the app very slow.</li>
  <li>What stops a hacker from reading/copy the decrypted (temp) file when it's available even for a short time?</li>
  </ol>
  
  <p>Do I understand SQLCipher's working correctly, if so, is there any other tools/methods to encrypt/protect a database so that the program can still read it with SQL Queries without making the data so easily available in any way, or any other suggestions you might have?</p>
  
  <p>Thank you</p>