I’m having trouble opening an unencrypted sqlite database with sqlcipher. I recently integrated sqlcipher and for my app’s purpose I need to read and write some data before encrypting the database. I’m using sqlite_modern_cpp https://github.com/SqliteModernCpp/sqlite_modern_cpp.git
I successfully compiled sqlcipher as follows:
../configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="/usr/lib/x86_64-linux-gnu/libcrypto.a"
And I’m initializing my database as follows:
sqlcipher_config config;
config.flags = OpenFlags::FULLMUTEX | OpenFlags::SHAREDCACHE | OpenFlags::READWRITE;
sqlcipher_database db(dbPath, config);
But when I try to initialize it I get the following error: SQL logic error
I’m using node-gyp to compile my executable and I’m stating libraries as follows:
"libraries": [
"-pthread",
"-ldl",
"/usr/lib/x86_64-linux-gnu/libssl.a",
"/usr/lib/x86_64-linux-gnu/libcrypto.a",
"/usr/local/lib/libsqlcipher.a",
"/usr/local/lib/libsignal-protocol-c.a",
"/usr/lib/libcivetweb.so",
"/usr/local/lib/libcjson.a",
"/usr/local/lib/spdlog/libspdlog.a"
]
I’m running Ubuntu and libssl 1.1.0
Any help will be much appreciated