Re: Applying iOS file protection to SQLite databases
Re: Applying iOS file protection to SQLite databases
- Subject: Re: Applying iOS file protection to SQLite databases
- From: Conrad Shultz <email@hidden>
- Date: Wed, 15 Aug 2012 22:50:21 -0700
Jens,
I vaguely recall this being covered in one of the 2010 or 2011 WWDC videos... title was something along the lines of "Securing iOS Data."
Might be worth a look, but it looks like you found the major piece.
(Sent from my iPhone.)
--
Conrad Shultz
On Aug 15, 2012, at 20:35, Jens Alfke <email@hidden> wrote:
>
> 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 (email@hidden)
>
> 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:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden