Re: Core Data: How to encrypt a persistent store
Re: Core Data: How to encrypt a persistent store
- Subject: Re: Core Data: How to encrypt a persistent store
- From: Jens Alfke <email@hidden>
- Date: Thu, 22 May 2008 07:47:18 -0700
On 22 May '08, at 3:12 AM, Ruotger Skupin wrote:
I have an application which uses Core Data and handles sensitive
information. Is there an easy way to encrypt the on-disk persistent
store provided I'm reasonably fluent in libCrypto and do not want to
use an encrypted disk image?
With the sqlite store I think you'd be limited to encrypting the
contents of individual column values (with the side effect that you'd
no longer be able to query or sort on those values.) If there's some
individual property you want to encrypt, like the contents of a
message, then you could make the persistent property be
"encryptedContents" and declare a transient "contents" property that
does the en/decryption based on the persistent value.
I've used sqlite a fair bit and I don't remember seeing any hooks that
would let you intercept the raw file reads and writes it makes, which
is what would be required to encrypt the entire database.
With the XML store you could probably override some methods (as the
previous reply points out) to encrypt the entire file as it's being
read or written.
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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