8000 Issue warning for deprecated PRAGMA cipher command · githubzhaoliang/sqlcipher@bc9fda6 · GitHub
[go: up one dir, main page]

Skip to content

Commit bc9fda6

Browse files
Issue warning for deprecated PRAGMA cipher command
1 parent ac840a9 commit bc9fda6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/crypto.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ int sqlcipher_codec_pragma(sqlite3* db, int iDb, Parse *pParse, const char *zLef
144144
if(ctx) {
145145
if( zRight ) {
146146
sqlcipher_codec_ctx_set_cipher(ctx, zRight, 2); // change cipher for both
147+
char *pragma_cipher_deprecated_msg = "PRAGMA cipher command is deprecated, please remove from usage.";
148+
codec_vdbe_return_static_string(pParse, "cipher", pragma_cipher_deprecated_msg);
149+
sqlite3_log(SQLITE_WARNING, pragma_cipher_deprecated_msg);
150+
return SQLITE_ERROR;
147151
}else {
148152
codec_vdbe_return_static_string(pParse, "cipher",
149153
sqlcipher_codec_ctx_get_cipher(ctx, 2));

0 commit comments

Comments
 (0)
0