allow HMAC behavior override via DEFAULT_USE_HMAC

This commit is contained in:
Stephen Lombardo 2011-02-19 14:57:11 -05:00
parent ff52bfe0a9
commit 7531bed022
2 changed files with 5 additions and 1 deletions

View File

@ -613,7 +613,7 @@ int sqlite3CodecAttach(sqlite3* db, int nDb, const void *zKey, int nKey) {
/* Use HMAC signatures by default. Note that codec_set_use_hmac will implicity call
codec_set_page_size to set the default */
if((rc = codec_set_use_hmac(db, nDb, 1)) != SQLITE_OK) return rc;
if((rc = codec_set_use_hmac(db, nDb, DEFAULT_USE_HMAC)) != SQLITE_OK) return rc;
cipher_ctx_copy(ctx->write_ctx, ctx->read_ctx);

View File

@ -48,6 +48,10 @@
#define PBKDF2_ITER 4000
#endif
#ifndef DEFAULT_USE_HMAC
#define DEFAULT_USE_HMAC 1
#endif
void sqlite3pager_get_codec(Pager *pPager, void **ctx);
int sqlite3pager_is_mj_pgno(Pager *pPager, Pgno pgno);
sqlite3_file *sqlite3Pager_get_fd(Pager *pPager);