Le 23 janv. 09 à 16:10, fc...@dialup4less.com a écrit :

I would like to:
1) Encrypt/Encode a SQLite DB file from the command line (or via an application) and 2) De-Encrypt/Decode the same SQLite DB from within Cocoa/iPhone via a key of some sort.

Scenario:
I'm developing a game using data values stored within a SQLite DB file. I don't want hackers to pry into the DB file and cheat the game; yet I need to occasionally update the SQLite DB file via
importing MS Excel data.

I'm thinking of encypting the DB file that is stored with the Application Bundle, then programmatically de-code it within a working directory to glean the contents; then remove the de-coded SQLite DB file.

So the game data is stored as an encrypted SQLite DB file within the bundle, to be de-encrypted upon
game startup to load the environment variables.

If this is an iPhone app, it should be signed, and AFAK, the iPhone is far more strict than Mac OS with tempered applications. And so, you don't need to do something special to prevent resources modifications.

That said, the simplest way to crypt data on OS X is to use the CommonCrypto API. (see /usr/include/CommonCrypto/CommonCryptor.h)

And it look like this API is also available on iPhone (see the CryptoExercise sample code).


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to