Android Question SQLCipher 1.6 - PRAGMA cipher_migrate

Discussion in 'Android Questions' started by gravel, Feb 3, 2019.

  1. gravel

    gravel Member Licensed 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?
     
  2. Erel

    Erel Administrator Staff Member Licensed 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.
     
  3. RB Smissaert

    RB Smissaert Well-Known Member Licensed User

    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
     
  4. gravel

    gravel Member Licensed 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.
     
  5. gravel

    gravel Member Licensed User

    It looks as if the new beta version of DB Browser works with SQLCipher 4 https://github.com/sqlitebrowser/sqlitebrowser/issues/1656
     
  6. RB Smissaert

    RB Smissaert Well-Known Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice