@@ -85,6 +85,7 @@ int sqlcipher_register_provider(sqlcipher_provider *p) {
8585 sqlcipher_free (default_provider , sizeof (sqlcipher_provider ));
8686 }
8787 default_provider = p ;
88+ return SQLITE_OK ;
8889}
8990
9091void sqlcipher_activate () {
@@ -637,7 +638,7 @@ static int sqlcipher_page_hmac(cipher_ctx *ctx, Pgno pgno, unsigned char *in, in
637638int sqlcipher_page_cipher (codec_ctx * ctx , int for_ctx , Pgno pgno , int mode , int page_sz , unsigned char * in , unsigned char * out ) {
638639 cipher_ctx * c_ctx = for_ctx ? ctx -> write_ctx : ctx -> read_ctx ;
639640 unsigned char * iv_in , * iv_out , * hmac_in , * hmac_out , * out_start ;
640- int tmp_csz , csz , size ;
641+ int size ;
641642
642643 /* calculate some required positions into various buffers */
643644 size = page_sz - c_ctx -> reserve_sz ; /* adjust size to useable size and memset reserve at end of page */
@@ -733,7 +734,7 @@ static int sqlcipher_cipher_ctx_key_derive(codec_ctx *ctx, cipher_ctx *c_ctx) {
733734 cipher_hex2bin (z , n , c_ctx -> key );
734735 } else {
735736 CODEC_TRACE (("codec_key_derive: deriving key using full PBKDF2 with %d iterations\n" , c_ctx -> kdf_iter ));
736- c_ctx -> provider -> kdf (c_ctx -> provider_ctx , c_ctx -> pass , c_ctx -> pass_sz ,
737+ c_ctx -> provider -> kdf (c_ctx -> provider_ctx , ( const char * ) c_ctx -> pass , c_ctx -> pass_sz ,
737738 ctx -> kdf_salt , ctx -> kdf_salt_sz , c_ctx -> kdf_iter ,
738739 c_ctx -> key_sz , c_ctx -> key );
739740
0 commit comments