sqlcipher | standalone fork of SQLite that adds 256 bit AES encryption | Database library
kandi X-RAY | sqlcipher Summary
kandi X-RAY | sqlcipher Summary
SQLCipher extends the SQLite database library to add security enhancements that make it more suitable for encrypted local data storage like:. SQLCipher is based on SQLite and stable upstream release features are periodically integrated. SQLCipher is maintained by Zetetic, LLC, and additional information and documentation is available on the official SQLCipher site.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of sqlcipher
sqlcipher Key Features
sqlcipher Examples and Code Snippets
Community Discussions
Trending Discussions on sqlcipher
QUESTION
I am trying to open a sqlite3 database encrypted with sqlcipher. I have the password and I could open it successfully using sqlitebrowser.
I started my project using this template. It is based on the electron-forge webpack plugin.
When I type yarn start
, it creates a .webpack folder and all the compiled code goes in it. When I stop the terminal command, this folder disappears.
Then I wanted to use the package @journeyapps/sqlcipher to open my database, but this line is causing an error in the main process: const sqlite3 = require("@journeyapps/sqlcipher")
The error is:
Error: Cannot find module '<>/.webpack/main/native_modules/lib/binding/napi-v6-linux-x64/node_sqlite3.node'
The package documentation says two things about using it with electron-forge:
make sure that the folder node_modules/@journeyapps/sqlcipher/lib/binding/napi-v6-linux-x64 exists -> yes it exists
Disable rebuilding of this library using the onlyModules option of electron-rebuild in your package.json
"config": { "forge": { "electronRebuildConfig": { "onlyModules": [] // Specify other native modules here if required } }
-> I did it, I added the lines of code
I still have the error, but I feel it can be solved "easily" (with a lot more understanding of webpack than I have). Indeed, a solution would be to move the folder binding/napi-v6-linux-x64 into .webpack each time I launch the app, right?
I tried to do electron-rebuild -f -w sqlite3
, the rebuild succeeded but nothing happens, I still have the same error.
I am stuck here and cannot go further for my app, as it lays on reading this database. Should I start a new project and avoid using webpack? Do you have any example of a project where this package is successfully imported and used?
Thank you in advance for your help!
...ANSWER
Answered 2022-Jan-21 at 15:17Well, I finally figured it out. Actually, I tried so much little changes but I managed to make the app work (nearly) as expected.
How I found the solutionFirst: this doesn't have anything to do with the library sqlcipher itself. In fact, it's a webpack configuration problem while dealing with native libraries.
I started a fresh minimal install of electron-forge with Webpack and Typescript template (npx create-electron-app test-electron-forge-github --template=typescript-webpack
) and added sqlite3 and @journeyapps/sqlcipher. It worked so I made a lot of changes in my Webpack configuration to make it closer with the electron-forge one.
The changes I made broke Redux. I chose to sacrifice Redux in order to make sqlcipher work, as today I didn't find a solution for both of them to work.
Old Webpack configuration filesmain.webpack.js
QUESTION
Working on a Kotlin Multiplatform project. Need to integrate SQLCipher, which we have done for the Android part, and now I am working on the iOS side.
I have built SQLCipher and integrated using c_interop.
SQLCipher documentation for Swift says this:
...ANSWER
Answered 2021-Dec-02 at 17:52I figured this out and hope this helps. First I had to do everything inside memscoped so we had access to alloc() methods.
Then I realised one issue was my database path was incorrect. Using XCode you can click on Window -> Devices & Simulators, click your app, then click the cog and press Download Container. Then inspect the container of your app to see where the database is. For me it was inside Application Support.
You can then check if your DB exists like so:
QUESTION
We need to include SQLCipher in our KMM project without using Cocoapods. This involves building a libSQLCipher.a. I was able to this in terminal with these commands:
...ANSWER
Answered 2021-Nov-25 at 07:55Kotlin/Native's cinterop
tool should have all compiler options specified explicitly to "see" the header the same way as your compiler did when building the library. To specify the compiler options, please use the DSL as described in the documentation.
In general, something like that should work:
QUESTION
I have a requirement for using an ORM for my Go application which can connect to a postgreSQL db or SQLite db.
The docs of gorm don't mention anything about connecting to an encrypted sqlite db.
Is it possible to use it or any way of providing a custom driver for sqlite which will work with and encrypted SQlite DB?
UPDATE
As per Ezequiel Muns comment, I updated the gorm SQLite driver code to use github.com/mutecomm/go-sqlcipher.
This new GORM driver can be found here.
Cheers !!
...ANSWER
Answered 2021-Mar-27 at 16:06Gorm uses a system of drivers that adapt the individual database clients for its use.
You'd have to create a new module that copies the source of go-gorm/driver/sqlite
but updating https://github.com/go-gorm/sqlite/blob/master/sqlite.go#L8 to import the alternate library of your choice. Since these are forks and they comply with the database/sql interface, it should just work. You'll then be able to use this new driver as per normal in gorm:
QUESTION
I have been trying to build sqlcipher3 on MacOS with the following command:
...ANSWER
Answered 2021-Jan-31 at 00:59I'm not too sure about the cause of the problem,
but have you considered manualy downloading it from github and setting it near the code that uses that?
I know it's probably not the solution you were searching for but it might be all it takes...
QUESTION
I am experiencing Runtime exception after enabling the minified and proguard. It only happens to the fragment that inside Dynamic Feature Module that i navigate into using deeplink. Another fragment inside the :app module doesnt get affected either by deeplink or using default bottom view navigation. Here is the logcat:
...ANSWER
Answered 2021-Feb-04 at 05:40Turns out i have to change the context that i pass into Dagger in the dynamic feature module fragment. So, instead using requireContext()
, use requireActivity().appicationContext
in my case. The code should be looking like this:
QUESTION
I'm not being able to select from SQLcipher database with DBD::SQLcipher.
I tried various ways, and it still think the file i'm providing is not sqlcipher db (which i'm sure it is)
The first function tries to connect regular SQLite3 database, and on failure connects to SQLcipher (this does happen).
This is my code:
...ANSWER
Answered 2021-Jan-26 at 14:54Found the answer!
Steps:
- Compile openssl (I use 1.1.1) - keep libcrypto.so
- Compile sqlcipher (I use 4.3.0) with the libcrypto you just created.
- Download DBD-SQLite (Latest right now is 1.66) and unzip
- Copy sqlite3.c sqlite3.h sqlite3ext.h from sqlcipher folder to DBD-SQLite
- Copy libcrypto.so to DBD-SQLite
- Edit LDFLAGS, LDDLFLAGS, CFLAGS add this after all defenition:
QUESTION
I'm using SQLCipher (community edition) running with .NET and Entity Core. Everything works perfectly including changing a password on existing database.
For example, if DB is protected with password '1' it is no issue to change (rekey) it to '2' or anything else. However, there is an issue when I want to protect unprotected database or remove protection from a database that has password.
At the moment the code that changes password for a DB looks like:
...ANSWER
Answered 2021-Jan-15 at 10:46'PRAGMA rekey' is used to change existing password for the database. To set password for unencrypted database or remove it from a password protected one should use sqlcipher_export() function. This is described in SQLCipher documentation here.
And maybe someone would find code sample useful. For decrypting db you should just establish connection like:
QUESTION
I have a website made in Django, where people shall be able to post questions and answer them -just like a copy of Stack Overflow.
When the user visits http://localhost/?post=Example it filters the database for posts with the name example. Later on I will do so there can only be exactly one post with the same name.
Currently it just renders the post/question in the HTML document using {{post.author}} for instance.
ANSWER
Answered 2020-Dec-31 at 12:09If there is exactly one post, it does not make sense to filter, you should use get_object_or_404(…)
[Django-doc]:
QUESTION
after building sqlcipher, copied sqlite3.c and sqlite3.h in the root folder, I'm trying to build sqlcipher3 (on Windows 10, Python 3.9.0):
...ANSWER
Answered 2020-Dec-18 at 22:32I just had the same issue today, with pretty much exactly the same setup. I needed to do two modifications in order to successfully compile sqlcipher3:
The content of the
MODULE_NAME
precompiler definition is set in line 38 ofsetup.py
. The functionquote_argument
, which is called here, differentiates between Windows and other platforms. On Windows, the quote character is escaped with a backslash. At least for MSVC2019, this seems to be incorrect. To fix it, just remove the Windows-specific stuff on line 35.The library names of OpenSSL have changed in version 1.1.0. If you are using a newer version, you might have to change the library name from
libeay32.lib
tolibcrypto.lib
or whatever the library is called on your system (in line 132). In addition, you might have to set the environment variableOPENSSL_CONF
, to help the build script to find OpenSSL on your system.
With these two small modifications, the build process worked fine.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sqlcipher
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page