restores usage note on sqlite3_rekey behavior for #301 and #383

This commit is contained in:
Stephen Lombardo 2021-03-16 11:29:10 -04:00
parent 20c0875533
commit a646b5cedd

View File

@ -5976,6 +5976,19 @@ int sqlite3_key_v2(
** The code to implement this API is not available in the public release
** of SQLite.
*/
/* SQLCipher usage note:
If the current database is plaintext SQLCipher will NOT encrypt it.
If the current database is encrypted and pNew==0 or nNew==0, SQLCipher
will NOT decrypt it.
This routine will ONLY work on an already encrypted database in order
to change the key.
Conversion from plaintext-to-encrypted or encrypted-to-plaintext should
use an ATTACHed database and the sqlcipher_export() convenience function
as per the SQLCipher Documentation.
*/
int sqlite3_rekey(
sqlite3 *db, /* Database to be rekeyed */
const void *pKey, int nKey /* The new key */