Closed kulwinders closed 3 years ago
@kulwinders can you provide more code of yours? Do you try to save attachments?
nevermind, I run into the same issue here: https://github.com/calvinmetcalf/crypto-pouch/issues/13#issuecomment-186394813
I don’t know much about crypto, but the problem comes from this line:
chacha.createCipher(key, nonce);
var nonce = crypto.randomBytes(12)
is an empty array in Chrome, while it’s a buffer with .length === 12
in node.
Any ideas?
will be fixed with https://github.com/calvinmetcalf/crypto-pouch/pull/18 – problem was outdated browserify version
I was trying to use this modul in my angular based web app but keeps on getting
Uncaught (in promise) RangeError: Trying to access beyond buffer length(…) checkOffset @ bundle.js:7543 Buffer.readUInt32LE @ bundle.js:7566 Chacha20 @ bundle.js: 8225Cipher @ bundle.js:8089 createCipher @ bundle.js:8189 encrypt @ bundle.js:22238 incoming @ bundle.js: 21795handlers.bulkDocs @ bundle.js:21844