Skip to content

Commit a646b5c

Browse files
committed
restores usage note on sqlite3_rekey behavior for sqlcipher#301 and sqlcipher#383
1 parent 20c0875 commit a646b5c

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/sqlite.h.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5976,6 +5976,19 @@ int sqlite3_key_v2(
59765976
** The code to implement this API is not available in the public release
59775977
** of SQLite.
59785978
*/
5979+
/* SQLCipher usage note:
5980+
5981+
If the current database is plaintext SQLCipher will NOT encrypt it.
5982+
If the current database is encrypted and pNew==0 or nNew==0, SQLCipher
5983+
will NOT decrypt it.
5984+
5985+
This routine will ONLY work on an already encrypted database in order
5986+
to change the key.
5987+
5988+
Conversion from plaintext-to-encrypted or encrypted-to-plaintext should
5989+
use an ATTACHed database and the sqlcipher_export() convenience function
5990+
as per the SQLCipher Documentation.
5991+
*/
59795992
int sqlite3_rekey(
59805993
sqlite3 *db, /* Database to be rekeyed */
59815994
const void *pKey, int nKey /* The new key */

0 commit comments

Comments
 (0)