multiple web workers

This commit is contained in:
Bart Butler
2018-03-05 21:36:53 -08:00
parent 572abadc91
commit 2bb5db2cf4
4 changed files with 82 additions and 51 deletions

View File

@@ -50,7 +50,7 @@ function tests() {
describe('Random number pipeline', function() {
it('Random number buffer automatically reseeded', function() {
const worker = new Worker('../dist/openpgp.worker.js');
const wProxy = new openpgp.AsyncProxy({ path:'../dist/openpgp.worker.js', worker });
const wProxy = new openpgp.AsyncProxy({ path:'../dist/openpgp.worker.js', workers: [worker] });
return wProxy.delegate('encrypt', { publicKeys:[pubKey], data:plaintext });
});