Documentation of sqlite3_rekey says that we can use it to encrypt a database that is not currently encrypted:
/*
** Change the key on an open database. If the current database is not
** encrypted, this routine will encrypt it. If pNew==0 or nNew==0, the
** database is decrypted.
**
** The code to implement this API is not available in the public releasejavascript:noop()
** of SQLite.
*/
The documentation of PRAGMA rekey however states that it cannot be used to encrypt a standard sqlite database.
You should either update the documentation of the sqlite3_rekey function or plan to implement that feature.
Documentation of
sqlite3_rekeysays that we can use it to encrypt a database that is not currently encrypted:The documentation of
PRAGMA rekeyhowever states that it cannot be used to encrypt a standard sqlite database.You should either update the documentation of the
sqlite3_rekeyfunction or plan to implement that feature.