If you are trying to protect against casual snooping, you could probably zip the sqlite data with a password then have your application unzip the data to a temp location on open, then re-zip at the end, deleting the unzipped file. Your application then would be able to use the normal sqlite calls to use the data.

Or for field by field encryption, you could create an encryt/decrypt function so that only encrypted data is stored in the db.

INSERT INTO myTable (mySensitiveField) VALUES( encrypt(@ClearText, @password) );

SELECT * FROM myTable where decrypt(mySensitiveField, @password) LIKE @SearchPattern;

Hope those ideas help.

I've written plenty of Freebasic programs using sqlite, but never had the need to encrypt or control access.

David

On 2016-10-07 10:46 PM, Damien Sykes-Lindley wrote:
Hi there,
My name is Damien Lindley, and I am, among other things, an independent, hobbiest programmer. I have been blind since birth and thus all my computer work relies on screenreader software and keyboard. I have only just come through the brink of scripting into compiled programming and so I guess I am still a beginner in many respects. However I don’t work in C or C++, so most of my programming, if using a library, relies on precompiled static or dynamic libraries. Or of course libraries that are written or converted specifically for the language I work in (FreeBASIC). Recently, I decided I needed to create a piece of software that could manage family trees, since there seems to be a lack of screenreader accessible genealogy managers out there. I was advised the best way to do this is to use a database engine. I was also informed that SQLite is always a good choice for databases. I must admit, I have never worked with databases before and so now I am in the process of learning SQL. However looking at the programming API for SQLite I cannot see any means of password protecting the database without either buying a commercial extension to do this, or recompiling SQLite with the authentication extension. Due to financial constraints and unfamiliarity with compiling in C both of these are not an option for me. Also I need a secure way to do this, as I think I read that the SQLite version simply uses a table to store the user data, which of course can be read and accessed elsewhere.
Are there any other options available for doing this?
Any help appreciated.
Thanks.
Damien.


_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to