Hello, I’m very impressed with ExeOutput
I’m prepairing small project which include also Sqlite db. with some sensitive information so I try to password protect it.
I have try following code $db = new SQLite3($dbname, 066, $encryption_key); the db was created but it wasn’t passoword protected.
After a day spent searching for solution I don’t find a solution for Sqlite encryption or password protection with php and ExeOutput. Is this possible?
I know that oficial encryption cost about 2000 usd but is there a way around to use some built in php function?
Phpclass is OK, but it works with decrypted db, and encrypt it on the end and save it. I will test it with our app and see the output. The problem is that when using the db, it is visablble to other programs. Is it possible to decrypt it only in memory of Exeoutput?
Sure, you can compile your existing SQLite database into ExeOutput and it will be stored as a virtual file, only accessible by your program. However, changes won’t be saved unless you encrypt your database into an external file before the application closes.
I was in need of this myself and managed to build a php_pdo_sqlcipher extension (dll) that works like pdo_sqlite with all the encrypt / decrypt methods baked in from the sqlcipher project. I’ve put the built DLL on GitHub although it’s likely not hacker proof and currently only for PHP 5.6. If there’s enough interest I’ll add the steps it took to build.
@mfink I had forgotten to thank you again for this!
We gave it a run in school computer lab and failed a few times (our mistype) but in end had working version. When get time, going to have to try for PHP7.2
Just saw this. So glad it helped! It certainly is a walk in the dark to get this going.
For others who’ve commented on Github, I realized I should have mentioned you’ll need to include the php_curl dll to be compiled in the module since there isn’t a way (that I know of anyway!) to include the required OpenSSL dlls (ssleay32.dll & libeay32.dll) in the compiliation without curl (which does this by default).
The feature to encrypt external file (like in a data folder) has been implemented. You can choose to have external file, choose encryption and keep file in a folder. Have not used it, so can’t really comment about usage.