Forum > Databases
Example of using encrypted sqlite databases for Lazarus needed.
wekwejt.com:
Hi guys!
I need to use encrypted sqlite database: sqlcipher or wxsqlite3 in my project but I have no experience with encryption sqlite and I can't find any example of that one.
I have created sqlcipher database with SQLiteStudio and I tried to connect with SQLdb components without succeed. Can someone help?
PierceNg:
1. What OS?
2. No matter the OS, SQLcipher requires its own dll/so/dylib file that replaces sqlite3.dll/so/dylib.
3. Does SQLiteStudio come with a copy of sqlcipher.dll/so/dylib? If yes, you can use it. If no, meaning SQLiteStudio linked SQLcipher statically, then you need to find a copy of sqlcipher.dll/so/dylib for your Pascal program to use. Being a crypto library, it is better to build it yourself.
PierceNg:
--- Quote from: devEric69 on October 14, 2021, 03:35:49 pm ---
--- Quote from: PierceNg on October 14, 2021, 02:43:52 pm ---Being a crypto library, it is better to build it yourself.
--- End quote ---
AMHO:
a) when using an open-source database server (like SQLite)...
b) ...most of the time the publisher doesn't want to write a cryptographic layer, since it is open-source :) .
So, as said before, it's better - you should - to write your own "proprietary code" (that will produce XORed data to be stored).
--- End quote ---
I wasn't clear. I didn't mean for OP to implement the crypto they need. I just meant they should build the sqlcipher library from source, instead of downloading a binary from dunno where.
Where crypto is concerned, open is good. A good crypto system's security relies entirely on the randomness and length of key. No secret algorithms. There are enough good quality crypto libraries available.
wekwejt.com:
Thank you PierceNg for clues!
I do it for windows systems.
So I'm going to try to build binaries.
wekwejt.com:
Now I have made libraries an database. It works with command line but I still can't connect with Lazarus components (SQLdb or Zeos).
Some more clues?
Navigation
[0] Message Index
[#] Next page