Random Ramblings on LabVIEW Design

Community Browser
Labels
cancel
Showing results for 
Search instead for 
Did you mean: 

Encrypted SQLite - A Gift

swatts
Active Participant

Hello My Lovelies,

Sorry I've been quiet, been really really busy. I hope you are all doing well.

 

Friday at about 4:30 Joerg raised the question of using encryption on SQLite, and it's something that has been raised a few times. So here's how we did it!

 

The interface to SQLite is a dll - sqlite3.dll for 32 bit or sqlite3_64.dll for 64 bit.

 

What I really wanted was a drop in dll, so a google search kicked up this....

 

https://www.zetetic.net/sqlcipher/documentation/

 

Splendid, but all really wanted was a dll (and I didn't want to build it myself!)

 

Thinking outside the box, I thought I could download something that used it and swipe the dll (if it's on an appropriate license), well ....

 

https://sqlitebrowser.org/about/

 

That was downloaded and installed and these files were available.

 

FileToNick.png

Note the libcrypto and libssl dlls are required dependencies

These were moved to the following directory in James toolkit.

Dir.png

Next you will need to modify the open vi in James toolkit to find the new dll

OpenVI.png

That's about it... So how do you use it.

Firstly I encrypted a database using the DBBrowser software I swiped the dlls from.

Then you have to use the PRAGMA key ='password' SQL statement

OpenEncrypted.png

Then it will work just fine (albeit a bit slower).

The final piece of the puzzle was to be able to convert an unencrypted dB to an encrypted dB.

image_2020_12_06T16_31_53_677Z.png

This shows how to do it.

It took about an hour to sort this and test it. Which is rather pleasing and a testament to James's design.

If I can be arsed (and there's any interest) I'll load some examples.

Lots of Love

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

Comments