Skip to content

Commit 28d2f01

Browse files
authored
Merge pull request #266 from OP-Engineering/oscar/update-sqlcipher
Update sqlcipher
2 parents 7d82488 + 5a14515 commit 28d2f01

7 files changed

Lines changed: 10152 additions & 5494 deletions

File tree

android/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ if (USE_SQLCIPHER)
3232
add_definitions(
3333
-DOP_SQLITE_USE_SQLCIPHER=1
3434
-DSQLITE_HAS_CODEC
35-
-DSQLITE_TEMP_STORE=2
35+
-DSQLITE_TEMP_STORE=3
36+
-DSQLITE_EXTRA_INIT=sqlcipher_extra_init
37+
-DSQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown
3638
)
3739

3840
find_package(openssl REQUIRED CONFIG)

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ dependencies {
238238
implementation 'com.facebook.react:react-native'
239239
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
240240
if (useSQLCipher) {
241-
implementation('com.android.ndk.thirdparty:openssl:1.1.1q-beta-1')
241+
implementation('io.github.ronickg:openssl:3.3.2')
242242
}
243243
}
244244

cpp/sqlcipher/sqlite3.c

Lines changed: 9802 additions & 5435 deletions
Large diffs are not rendered by default.

cpp/sqlcipher/sqlite3.h

Lines changed: 343 additions & 53 deletions
Large diffs are not rendered by default.

example/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,12 @@
6767
},
6868
"op-sqlite": {
6969
"libsql": false,
70-
"sqlcipher": false,
70+
"sqlcipher": true,
7171
"iosSqlite": false,
7272
"fts5": true,
7373
"rtree": true,
7474
"crsqlite": false,
7575
"sqliteVec": false,
76-
"sqliteFlags": "-DSQLITE_TEMP_STORE=2",
7776
"performanceMode": true,
7877
"tokenizers": [
7978
"wordtokenizer",

example/src/tests/dbsetup.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let expect = chai.expect;
1717
const expectedVersion = isLibsql()
1818
? '3.45.1'
1919
: isSQLCipher()
20-
? '3.46.1'
20+
? '3.49.1'
2121
: '3.49.1';
2222
const flavor = isLibsql() ? 'libsql' : isSQLCipher() ? 'sqlcipher' : 'sqlite';
2323

op-sqlite.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Pod::Spec.new do |s|
129129
if use_sqlcipher then
130130
log_message.call("[OP-SQLITE] using SQLCipher 🔒")
131131
exclude_files += ["cpp/sqlite3.c", "cpp/sqlite3.h", "cpp/libsql/bridge.c", "cpp/libsql/bridge.h", "cpp/libsql/bridge.cpp", "cpp/libsql/libsql.h"]
132-
xcconfig[:GCC_PREPROCESSOR_DEFINITIONS] += " OP_SQLITE_USE_SQLCIPHER=1 HAVE_FULLFSYNC=1 SQLITE_HAS_CODEC SQLITE_TEMP_STORE=2"
132+
xcconfig[:GCC_PREPROCESSOR_DEFINITIONS] += " OP_SQLITE_USE_SQLCIPHER=1 HAVE_FULLFSYNC=1 SQLITE_HAS_CODEC SQLITE_TEMP_STORE=3 SQLITE_EXTRA_INIT=sqlcipher_extra_init SQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown"
133133
s.dependency "OpenSSL-Universal"
134134
elsif use_libsql then
135135
log_message.call("[OP-SQLITE] using libsql 📘")

0 commit comments

Comments
 (0)