Use the URI format to specify the name of your cipher object and dynamically locate it within your vfs code.
e.g. ATTACH 'file:custom.db?vfs=myvfs&cipher=mylib:entry' as secret; -----Original Message----- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Esenthel Sent: Donnerstag, 21. Februar 2019 04:31 To: sqlite-users@mailinglists.sqlite.org Subject: [EXTERNAL] [sqlite] Opening a DataBase file with a custom "user data" parameter I'm trying to use "sqlite3_open_v2" with a custom VFS (file system), and pass a pointer "void *user_data" to the sqlite3_open_v2 function, so it gets passed down to the "sqlite3_vfs::xOpen" However there's no option for that, so how to do that? The reason is that for opening files in the custom callback, I need to use a pointer to some helper "cipher" class object, to allow my own encryption/decryption. However xOpen accepts only "const char *zName". I have one custom global VFS, and I want to use different ciphers / user data for each database I use. What would solve the problem: add new "void *user_data" parameter to functions "sqlite3_open_v2", and "sqlite3_vfs::xOpen". Thanks, Greg _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___________________________________________ Gunter Hick | Software Engineer | Scientific Games International GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0 May be privileged. May be confidential. Please delete if not the addressee. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users