Skip to content

Ecrypt existing database => IOS #3501

Answered by simolus3
CharlotteJu asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, thanks for the report! I'm also not sure what's going on here, the setup looks good to me. Can you try running the cipher_version pragma in checkAndEncryptFile too? Basically, I'm trying to find out whether SQLCipher was linked at all.

      if (await existing.exists() && !await encrypted.exists()) {
        final plaintextDb = sqlite3.open(decryptedPath);
        assert(rawDb.select('PRAGMA cipher_version;').isNotEmpty);
        plaintextDb
          ..execute("ATTACH DATABASE '${escapeString(encryptedPath)}' "
          // ...

If that's missing, a common problem may be that one of the other dependencies is linking the regular sqlite3 library from the system in some way (I know fireb…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@CharlotteJu
Comment options

Answer selected by CharlotteJu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants