I want to use a local database using SQlite to provide access of data in offline. The data should be read by a specific JS application, and only this one. How to prevent other application or malicious user to look in the database ? I am thinking about encryption but that will be hard because the key need to be hide on the application machine, and i dont know how to do that.
Thanks.
You can't.
If the data is stored in a file, then any local application can access it.
If the data is stored using a browser storage API, then other web application's won't be able to access it, but local applications and the user will be able to.
If you encrypt it, then the application will need to have the key to decrypt it, and if the application has access to the key then so does the user and other local applications.