-
I created a sqlite file using the following code Then I opened the file with Navicat and used the password '123456', but it was prompted that this is not a sqlite database file!How can I open it by navicat? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
The default cipher scheme used by SQLite3 Multiple Ciphers is ChaCha20-Poly1305 (aka chacha20). However, to my knowledge Navicat uses the cipher scheme wxSQLite3 AES-128 (aka aes128cbc). Therefore you have to explicitly select the cipher scheme that should be used, namely aes128cbc. A similar question was asked about 2 years ago here: wxSQLite3 issue #57. |
Beta Was this translation helpful? Give feedback.
-
Thank you, although I still don't know how to open it in Navicat, but I understand the cause of the problem. |
Beta Was this translation helpful? Give feedback.
-
Well, in the meantime I confirmed that Navicat supports the cipher scheme aes128cbc (which is the cipher scheme that was in use in wxSQLite3 for a long time, until support for other cipher schemes was added). If you want to create a new database file that is compatible with Navicat, you have to explicitly select the cipher scheme. There are 2 methods to accomplish that:
To open the database file in Navicat you create a new connection by selecting the type |
Beta Was this translation helpful? Give feedback.
-
Thank you very much, let me try |
Beta Was this translation helpful? Give feedback.
-
Both methods are ok, the test is successful, thank you |
Beta Was this translation helpful? Give feedback.
-
Since this "issue" is in fact not a real issue with the library, but nevertheless probably of interest for other users, I'm going to convert it into a "discussion". |
Beta Was this translation helpful? Give feedback.
Well, in the meantime I confirmed that Navicat supports the cipher scheme aes128cbc (which is the cipher scheme that was in use in wxSQLite3 for a long time, until support for other cipher schemes was added).
If you want to create a new database file that is compatible with Navicat, you have to explicitly select the cipher scheme. There are 2 methods to accomplish that:
file:db-file-name.db3?cipher=aes128cbc
in thesqlite3_open
function, and then set the chosen password with functionsqlite3_key
.sqlite3_open
, use functionsqlite3_exec
to execute the cipher scheme selection with SQL statementPR…