Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There are some ways to encrypt sqlite db? #219

Closed
peppababy7 opened this issue Oct 15, 2024 · 3 comments
Closed

There are some ways to encrypt sqlite db? #219

peppababy7 opened this issue Oct 15, 2024 · 3 comments

Comments

@peppababy7
Copy link

This library is good. But I have some questions, please help me.

  1. Is there some way to encrypt sqlite db? That is very important!
  2. If I'm query and update use SELECT so frequently (maybe 1-4 times/sec, maybe 1-4 times/min), should I increase the stack or memory size? What should I do.
@peppababy7
Copy link
Author

In other platforms I would encrypt the entire database and decrypt it on first opening. But in the this lib the sqlite db will write to the indexDB and split into many sub, so what should I do.

@sgbeal
Copy link

sgbeal commented Oct 15, 2024

  1. Encryption of an SQLite db is a project in and of itself, with several implementations available. See this forum post for a recent discussion which mentions the available options.

  2. 1-4 times/second is, in the general case, not terribly frequent for SQLite. As a rule of thumb, you don't need to change anything unless/until you determine, through observation and measurement, that doing so actually helps. Increasing the stack memory size won't help queries because they use dynamic memory, not stack memory. Depending on how the .wasm file is built, it may have a fixed or growable dynamic memory size. If it's fixed, you may need to increase it for large queries, but the query frequency, by itself, plays no significant role in memory usage. RAM usage is next to impossible to calculate accurately in advance, but if your app fails with allocation errors from wasm, growing the memory will be required.

@rhashimoto
Copy link
Owner

In this project, Issues are only for possible bugs in project code.

@rhashimoto rhashimoto closed this as not planned Won't fix, can't repro, duplicate, stale Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants