@@ -76,7 +76,7 @@ static int codec_set_btree_to_codec_pagesize(sqlite3 *db, Db *pDb, codec_ctx *ct
7676
7777static int codec_set_pass_key (sqlite3 * db , int nDb , const void * zKey , int nKey , int for_ctx ) {
7878 struct Db * pDb = & db -> aDb [nDb ];
79- sqlcipher_log (SQLCIPHER_LOG_DEBUG , "codec_set_pass_key: entered db=%p nDb=%d zKey=%p nKey=%d for_ctx=%d" , db , nDb , zKey , nKey , for_ctx );
79+ sqlcipher_log (SQLCIPHER_LOG_DEBUG , "codec_set_pass_key: db=%p nDb=%d for_ctx=%d" , db , nDb , for_ctx );
8080 if (pDb -> pBt ) {
8181 codec_ctx * ctx = (codec_ctx * ) sqlite3PagerGetCodec (pDb -> pBt -> pBt -> pPager );
8282
@@ -100,8 +100,10 @@ int sqlcipher_codec_pragma(sqlite3* db, int iDb, Parse *pParse, const char *zLef
100100 ctx = (codec_ctx * ) sqlite3PagerGetCodec (pDb -> pBt -> pBt -> pPager );
101101 }
102102
103- sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlcipher_codec_pragma: entered db=%p iDb=%d pParse=%p zLeft=%s zRight=%s ctx=%p" , db , iDb , pParse , zLeft , zRight , ctx );
104-
103+ if (sqlite3_stricmp (zLeft , "key" ) != 0 && sqlite3_stricmp (zLeft , "rekey" )) {
104+ sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlcipher_codec_pragma: db=%p iDb=%d pParse=%p zLeft=%s zRight=%s ctx=%p" , db , iDb , pParse , zLeft , zRight , ctx );
105+ }
106+
105107#ifdef SQLCIPHER_EXT
106108 if ( sqlite3_stricmp (zLeft , "cipher_license" )== 0 && zRight ){
107109 char * license_result = sqlite3_mprintf ("%d" , sqlcipher_license_key (zRight ));
@@ -732,7 +734,7 @@ static void* sqlite3Codec(void *iCtx, void *data, Pgno pgno, int mode) {
732734 int plaintext_header_sz = sqlcipher_codec_ctx_get_plaintext_header_size (ctx );
733735 int cctx = CIPHER_READ_CTX ;
734736
735- sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlite3Codec: entered pgno=%d, mode=%d, page_sz=%d" , pgno , mode , page_sz );
737+ sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlite3Codec: pgno=%d, mode=%d, page_sz=%d" , pgno , mode , page_sz );
736738
737739#ifdef SQLCIPHER_EXT
738740 if (sqlcipher_license_check (ctx ) != SQLITE_OK ) return NULL ;
@@ -832,7 +834,7 @@ static void sqlite3FreeCodecArg(void *pCodecArg) {
832834int sqlite3CodecAttach (sqlite3 * db , int nDb , const void * zKey , int nKey ) {
833835 struct Db * pDb = & db -> aDb [nDb ];
834836
835- sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlite3CodecAttach: entered db=%p, nDb=%d zKey=%p, nKey=%d " , db , nDb , zKey , nKey );
837+ sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlite3CodecAttach: db=%p, nDb=%d" , db , nDb );
836838
837839 if (nKey && zKey && pDb -> pBt ) {
838840 int rc ;
@@ -919,12 +921,12 @@ void sqlite3_activate_see(const char* in) {
919921}
920922
921923int sqlite3_key (sqlite3 * db , const void * pKey , int nKey ) {
922- sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlite3_key entered : db=%p pKey=%p nKey=%d " , db , pKey , nKey );
924+ sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlite3_key: db=%p" , db );
923925 return sqlite3_key_v2 (db , "main" , pKey , nKey );
924926}
925927
926928int sqlite3_key_v2 (sqlite3 * db , const char * zDb , const void * pKey , int nKey ) {
927- sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlite3_key_v2: entered db=%p zDb=%s pKey=%p nKey=%d " , db , zDb , pKey , nKey );
929+ sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlite3_key_v2: db=%p zDb=%s" , db , zDb );
928930 /* attach key if db and pKey are not null and nKey is > 0 */
929931 if (db && pKey && nKey ) {
930932 int db_index = sqlcipher_find_db_index (db , zDb );
@@ -935,7 +937,7 @@ int sqlite3_key_v2(sqlite3 *db, const char *zDb, const void *pKey, int nKey) {
935937}
936938
937939int sqlite3_rekey (sqlite3 * db , const void * pKey , int nKey ) {
938- sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlite3_rekey entered : db=%p pKey=%p nKey=%d " , db , pKey , nKey );
940+ sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlite3_rekey: db=%p" , db );
939941 return sqlite3_rekey_v2 (db , "main" , pKey , nKey );
940942}
941943
@@ -950,7 +952,7 @@ int sqlite3_rekey(sqlite3 *db, const void *pKey, int nKey) {
950952** 3. If there is a key present, re-encrypt the database with the new key
951953*/
952954int sqlite3_rekey_v2 (sqlite3 * db , const char * zDb , const void * pKey , int nKey ) {
953- sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlite3_rekey_v2: entered db=%p zDb=%s pKey=%p, nKey=%d " , db , zDb , pKey , nKey );
955+ sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlite3_rekey_v2: db=%p zDb=%s" , db );
954956 if (db && pKey && nKey ) {
955957 int db_index = sqlcipher_find_db_index (db , zDb );
956958 struct Db * pDb = & db -> aDb [db_index ];
@@ -1022,7 +1024,7 @@ int sqlite3_rekey_v2(sqlite3 *db, const char *zDb, const void *pKey, int nKey) {
10221024
10231025void sqlite3CodecGetKey (sqlite3 * db , int nDb , void * * zKey , int * nKey ) {
10241026 struct Db * pDb = & db -> aDb [nDb ];
1025- sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlite3CodecGetKey: entered db=%p, nDb=%d" , db , nDb );
1027+ sqlcipher_log (SQLCIPHER_LOG_DEBUG , "sqlite3CodecGetKey:db=%p, nDb=%d" , db , nDb );
10261028 if ( pDb -> pBt ) {
10271029 codec_ctx * ctx = (codec_ctx * ) sqlite3PagerGetCodec (pDb -> pBt -> pBt -> pPager );
10281030
0 commit comments