Quote:
Originally Posted by alexstuckey
I'm making an app that requires its contents to be encrypted. I have seen other applications on the App Store that offer hardware encryption of data stored in the apps.
I need to encrypt multiple entire directories, and be able to access their contents on the fly if possible.
How would I go about doing this?
Thanks
Alex
|
There's no hardware encryption (other than what Apple use at the hardware level to store files). You'll have to write your own encryption/decryption algorithm in software (there are plenty of options available to read about on the web). I'm sure there are open source solutions too if you don't want to write your own.
If the files you're going to encrypt are in your bundle, you'll have to write a Mac app to encrypt them before you compile your bundle. If they're user-generated files, you'll need to encrypt them in your app before writing them to the directory.
The only issue you're going to run into with the decryption might be speed, depending on how quickly and how often you need to access the data and what algorithm you use (although optimizing decryption algorithms is fun!

).