Quick proof of concept for using SQLCipher on iOS
Before opening the Xcode project, you will need to do the following.
In the project's root folder:
git clone https://github.com/sqlcipher/sqlcipher.git
git clone https://github.com/sqlcipher/openssl-xcode.git
Then add OpenSSL's source code to Xcode by following the instructions in the "Add OpenSSL Source Tree" section at http://sqlcipher.net/ios-tutorial.
After doing so, you should be able to open the project in Xcode and build it.
This App demonstrates how to use SQLcipher by showing how to:
- create an encrypted SQLite database.
- encrypt an existing plaintext SQLite database.
The code is just a proof of concept and isn't production ready. Also, to make the code as simple as possible, the encryption key is hardcoded in the App's source code. Implementers should instead engineer a proper key-derivation scheme using for example a passcode generated by the user.