Skip to content

An issue of sqlite3_key function #103

Answered by utelle
pal98 asked this question in Q&A
Discussion options

You must be logged in to vote

The problem is, when I call the function of "sqlite3_key", it always returns 0 (nResult is always 0), no matter the password (pw value) is correct or not.

Well, this is by design. The function sqlite3_key does not check whether the database is actually encrypted or not. This is documented in the description of the official SQLite Encryption Extension (SEE) - and this project does not change the behaviour. Here is the relevant quote from the documentation:

If you specify an incorrect key, you will not get an error message right away. But the first time you try to access the database you will get an SQLITE_NOTADB error with a message of "file is encrypted or is not a database".

If you…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pal98
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