• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Applying iOS file protection to SQLite databases
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applying iOS file protection to SQLite databases


  • Subject: Re: Applying iOS file protection to SQLite databases
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 15 Aug 2012 20:35:43 -0700

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


  • Follow-Ups:
    • Re: Applying iOS file protection to SQLite databases
      • From: Conrad Shultz <email@hidden>
References: 
 >Applying iOS file protection to SQLite databases (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: NSSpeechSynthesizer / DarkWake interaction
  • Next by Date: Re: NSSpeechSynthesizer / DarkWake interaction
  • Previous by thread: Applying iOS file protection to SQLite databases
  • Next by thread: Re: Applying iOS file protection to SQLite databases
  • Index(es):
    • Date
    • Thread