Android Question SQLCipher 1.6 - PRAGMA cipher_migrate

gravel

Member
Licensed User
Longtime User
I'm using SQLCipher 1.5 in an existing app. From Aug 2019 app updates will require 64-bit so I'll have to move to SQLCipher 1.6 which provides 64-bit support and upgrades from SQLCipher 3 to SQLCipher 4.

The SQLCipher 4 release notes https://www.zetetic.net/blog/2018/11/30/sqlcipher-400-release/ say to migrate existing databases in place with "PRAGMA cipher_migrate", and there is some discussion here https://discuss.zetetic.net/t/upgrading-to-sqlcipher-4/3283/6 as well.

But I don't see a way to use that in B4A as Sql.Initialize fails with a "not a database" error when opening an SQLCipher 3 database.

Is there a way to use cipher_migrate in B4A?
 

RB Smissaert

Well-Known Member
Licensed User
Longtime User
SQL.Initialize just calls the native method to open the database. Seems like the Android library doesn't support it.

You should decrypt the database, save the data, update the app and encrypt it again.

Is there any Windows application that can encrypt and decrypt SQLite databases with this latest SQLCipher version?
I am still using the old version as I can encrypt/decrypt on Windows with DB Browser for SQLite and can use the encrypted DB
in my Android app.

RBS
 
Upvote 0

gravel

Member
Licensed User
Longtime User
Thanks Erel. Even though 'my' DB data is sort of user generated, I can probably get around it as I have contact with users, but could be a bit a problem for others.
 
Upvote 0

gravel

Member
Licensed User
Longtime User
Upvote 0
Top