calvinmetcalf / crypto-pouch

plugin for encrypted pouchdb/couchdb databases
MIT License
243 stars 44 forks source link

Password doesn't work: any password you set it's valid #74

Closed GianLaz closed 2 years ago

GianLaz commented 4 years ago

I'm not sure this is an issue; maybe my code is wrong. I'm using the plugin on the browser. The first time I run the web-app with this code:

var db = new PouchDB('justatry'); db.crypto('anystringitsallowed'); db.put({_id: 'foo', bar: 'baz'}).then(function (res) { console.log(res); });

the second time:

var db = PouchDB('justatry'); db.crypto('differentpassword'); db.get('foo').then(function(doc) { console.log(doc); });

and I'm able to read the decrypted doc. Hmmm what I miss? Thank you

garbados commented 3 years ago

Hi @GianLaz ! We've just merged a major refactor of this library. Can you try again and let me know how it goes?

garbados commented 2 years ago

Closing for inactivity...