You can write your own VFS and then use it to open your encrypted database file. On open VFS will read file into memory and decrypt it. Then on each SQLite's request to read the file VFS will copy necessary part from the unencrypted location to the buffer provided by SQLite... It should work exactly as you want except some memory copying on each attempt to read...
Pavel On Wed, May 19, 2010 at 5:17 PM, Max Cat <[email protected]> wrote: > Hi all, > > Is there any way to load a sqlite3 db from a location in memory? Ideally, I'd > like to have a memory pointer (eg, something provided via malloc), which I > could then use as the handle sqlite3 uses to load the database. > > The reason I'm trying to do this: I have an encrypted database file that I > will copy into memory, decrypt, and then process. I would like to do this > entirely in memory (no unencrypted files on the HD) to reduce the likelihood > of casual users snooping in the db file. > > If that makes no sense, let me know, and I'll try to clarify. > > Thanks in advance for your help! :) > > -Max > > > > > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

