Skip to content

Commit

Permalink
Using the _v2 version of key and rekey.
Browse files Browse the repository at this point in the history
  • Loading branch information
developernotes committed Aug 29, 2013
1 parent 1f17e15 commit 20a92ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pragma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1810,10 +1810,10 @@ void sqlite3Pragma(

#ifdef SQLITE_HAS_CODEC
if( sqlite3StrICmp(zLeft, "key")==0 && zRight ){
sqlite3_key(db, zRight, sqlite3Strlen30(zRight));
sqlite3_key_v2(db, zDb, zRight, sqlite3Strlen30(zRight));
}else
if( sqlite3StrICmp(zLeft, "rekey")==0 && zRight ){
sqlite3_rekey(db, zRight, sqlite3Strlen30(zRight));
sqlite3_rekey_v2(db, zDb, zRight, sqlite3Strlen30(zRight));
}else
if( zRight && (sqlite3StrICmp(zLeft, "hexkey")==0 ||
sqlite3StrICmp(zLeft, "hexrekey")==0) ){
Expand All @@ -1825,9 +1825,9 @@ void sqlite3Pragma(
zKey[i/2] = (h2 & 0x0f) | ((h1 & 0xf)<<4);
}
if( (zLeft[3] & 0xf)==0xb ){
sqlite3_key(db, zKey, i/2);
sqlite3_key_v2(db, zDb, zKey, i/2);
}else{
sqlite3_rekey(db, zKey, i/2);
sqlite3_rekey_v2(db, zDb, zKey, i/2);
}
}else
#endif
Expand Down

0 comments on commit 20a92ab

Please sign in to comment.