Skip to content

Existing SQLite db to Sqlcipher db. #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
joshisunil-1983 opened this issue Jul 9, 2015 · 6 comments
Closed

Existing SQLite db to Sqlcipher db. #131

joshisunil-1983 opened this issue Jul 9, 2015 · 6 comments

Comments

@joshisunil-1983
Copy link

i have a ios app which already installed on client devices. i want to encrypt my database using sqlcipher. to do this i have implement the sqlcipher in my project and remove the old reference of sqlite. i am able to create new database using sqlcipher and other operations also can be performed over my new database. how can i use the old sqlite3 datase in my ios app which is updated with sqlcipher.

@brody4hire
Copy link

SQLCipher can also read an normal, unencrypted sqlite database. Just open it without using a key. Also, if I am not mistaken if you open an encrypted database, you should be able to ATTACH to an unencrypted database within the same sqlite database connection/handle. (@developernotes or other @sqlcipher owner correct me if I am not correct!)

@joshisunil-1983
Copy link
Author

ok after using that without key can i convert simple sqlite db to sqlcipher db.

@brody4hire
Copy link

Yes and a convenience function is documented here: https://www.zetetic.net/sqlcipher/sqlcipher-api/#sqlcipher_export

Note that this was also discussed in sqlcipher/android-database-sqlcipher#8.

@joshisunil-1983
Copy link
Author

can i run the sqlcipher_export in ios app using execute or prepare. or can u please pass me some sample link.

@developernotes
Copy link
Member

Hello @joshisunil-1983,

Yes, you can execute sqlcipher_export(…) using a prepared statement. If you are new to the C interface provided by SQLite, you may find this documentation helpful.

@joshisunil-1983
Copy link
Author

thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants