Skip to content

Commit

Permalink
Remove static modifier from codec password storage functions
Browse files Browse the repository at this point in the history
  • Loading branch information
developernotes committed Sep 29, 2017
1 parent 082a7e4 commit 320640d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
7 changes: 3 additions & 4 deletions src/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,9 @@ const char* sqlcipher_codec_get_cipher_provider(codec_ctx *ctx);
int sqlcipher_codec_ctx_migrate(codec_ctx *ctx);
int sqlcipher_codec_add_random(codec_ctx *ctx, const char *data, int random_sz);
int sqlcipher_cipher_profile(sqlite3 *db, const char *destination);
static void sqlcipher_profile_callback(void *file, const char *sql, sqlite3_uint64 run_time);
static int sqlcipher_codec_get_store_pass(codec_ctx *ctx);
static void sqlcipher_codec_get_pass(codec_ctx *ctx, void **zKey, int *nKey);
static void sqlcipher_codec_set_store_pass(codec_ctx *ctx, int value);
int sqlcipher_codec_get_store_pass(codec_ctx *ctx);
void sqlcipher_codec_get_pass(codec_ctx *ctx, void **zKey, int *nKey);
void sqlcipher_codec_set_store_pass(codec_ctx *ctx, int value);
int sqlcipher_codec_fips_status(codec_ctx *ctx);
const char* sqlcipher_codec_get_provider_version(codec_ctx *ctx);
int sqlcipher_codec_hmac(const codec_ctx *ctx, const unsigned char *hmac_key, int key_sz,
Expand Down
12 changes: 6 additions & 6 deletions src/crypto_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1309,6 +1309,12 @@ int sqlcipher_codec_add_random(codec_ctx *ctx, const char *zRight, int random_sz
return SQLITE_ERROR;
}

static void sqlcipher_profile_callback(void *file, const char *sql, sqlite3_uint64 run_time){
FILE *f = (FILE*)file;
double elapsed = run_time/1000000.0;
if(f) fprintf(f, "Elapsed time:%.3f ms - %s\n", elapsed, sql);
}

int sqlcipher_cipher_profile(sqlite3 *db, const char *destination){
#if defined(SQLITE_OMIT_TRACE) || defined(SQLITE_OMIT_DEPRECATED)
return SQLITE_ERROR;
Expand Down Expand Up @@ -1336,12 +1342,6 @@ int sqlcipher_cipher_profile(sqlite3 *db, const char *destination){
#endif
}

static void sqlcipher_profile_callback(void *file, const char *sql, sqlite3_uint64 run_time){
FILE *f = (FILE*)file;
double elapsed = run_time/1000000.0;
if(f) fprintf(f, "Elapsed time:%.3f ms - %s\n", elapsed, sql);
}

int sqlcipher_codec_fips_status(codec_ctx *ctx) {
return ctx->read_ctx->provider->fips_status(ctx->read_ctx);
}
Expand Down

0 comments on commit 320640d

Please sign in to comment.