On Aug 15, 2012, at 4:16 PM, I wrote:

> How can I enable full file protection (encryption) on iOS for SQLite 
> databases?

To answer my own question: buried down inside <sqlite3.h> I found the following 
flags that appear to have been added by Apple. There's no documentation of 
them, but I infer that you can OR them in with the other flags to 
sqlite3_open_v2 and get the corresponding level of file encryption. Presumably 
since this is managed internally by sqlite it will be applied to the temp/side 
files as well as the main database.

—Jens

/*
** CAPI3REF: Flags For File Open Operations
**
** These bit values are intended for use in the
** 3rd parameter to the [sqlite3_open_v2()] interface and
** in the 4th parameter to the [sqlite3_vfs.xOpen] method.
*/

…

#define SQLITE_OPEN_FILEPROTECTION_COMPLETE                             
0x00100000
#define SQLITE_OPEN_FILEPROTECTION_COMPLETEUNLESSOPEN                   
0x00200000
#define SQLITE_OPEN_FILEPROTECTION_COMPLETEUNTILFIRSTUSERAUTHENTICATION 
0x00300000
#define SQLITE_OPEN_FILEPROTECTION_NONE                                 
0x00400000

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to