> It looks like the initial changes were already pushed to master. Yeah those changes consisted of small code cleanup/modularization. I took the liberty of committing this, as I figured this good for the library either way. If we want to name the files differently than *.crypto.js and *.crypto.sym.js, I am not religious about the names.
> I notice in the web worker you're importing individual subcomponent js files (i.e. util.js), this will not work well in environments that only plan on deploying the entire openpgp.js (or min) file. Is it too bad overkill to point it to openpgp.js? Importing the whole min.js file wont work, since webworker will not like all the document and window references. This is the reason I had to modularize the symmetric encryption in the first place. What I actually do in safewith.me is generate an additional openpgp.worker.min.js with just the required modules for threading. Similarly, you're currently only using AES. Yes, this is just an example. Perhaps it would be possible to stick all ciphers in a openpgp.worker.min.js file for the library, which would need to be imported if multithreading is required. > I don't think adding one more file would be a huge detriment, but I'd like to avoid it if reasonably possible. I agree, especially if it's optional. > I'm thinking you might be able to inject the callback into the existing openpgp_crypto_symmetricEncrypt by adding an additional parameter which is the optional callback. If it is set, initialize a worker thread that will call the same openpgp_crypto_symmetricEncrypt(/Decrypt) as you have the workers laid out currently, and without the callback option they will run as it exists now. Is that similar to what you were thinking? I would have suggested that one level higher as proposed in the example on the pull request on github. This would require the asynchronous callback to be "boubled up" to the public api, as you have correctly pointed out. The main problem is that you cant pass function pointers to a worker thread (see pull request). Tankred
_______________________________________________ http://openpgpjs.org

