title: Cleanest way to determine if SqlCipher DB is encrypted
body: <p>What would be the cleanest and most efficient way to determine if a (nominally) SqlCipher database is actually encrypted (in iOS).  Note that the technique <a href="https://stackoverflow.com/a/17348924/581994">here</a> does not work with SqlCipher -- the "SQLite format 3" prefix is valid whether encrypted or not.</p>
  
  <p>The obvious way is to open the DB, attempt an operation on it, and see if the return code is SQLITE_NOTADB.  But it's not clear what operation to attempt.</p>
  
  <p><strong>Added:</strong>  Hmmm...  Apparently SOME versions of SqlCipher don't preserve the file prefix.</p>