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

Encryption of Database with Attachments #33

Open
patr1ck-234 opened this issue Apr 4, 2023 · 1 comment
Open

Encryption of Database with Attachments #33

patr1ck-234 opened this issue Apr 4, 2023 · 1 comment

Comments

@patr1ck-234
Copy link

Hi,

I thought to have understood this nice project, but somehow...

I'm working local in my js app and I simply want to keep only the decrypted database in indexed db when the app isn't used.

So I do

const db = new PouchDB('test');
db.setPassword('my');

now working with the app -> when closing:

db.loadDecrypted();
db.destroy({ unencrypted_only: 'true' });`

When returning

const db = new PouchDB('test');
db.setPassword('my');
db.loadEncrypted();

This is working fine until there are attachments in the db.
Then it fails saying

"Failed to execute 'readAsArrayBuffer' on 'FileReader': parameter 1 is not of type 'Blob'."
Any help would be very appreciated!

Best Regards

@garbados
Copy link
Owner

Yes, attachments are a caveat -- ComDB doesn't support them. crypto-pouch has a similar caveat https://github.com/calvinmetcalf/crypto-pouch

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

2 participants