arlolra/otr — pull request #44 by sualko (2013-10-28 12:07:22+00:00)
Title: Dsa webworker

following pr #43

```javascript
if (Worker) {
//create DSA key in background

var worker = new Worker('/lib/dsa-ww.js')

worker.onmessage = function(e) {
var type = e.data.type;
var data = e.data.data;

if (type == 'debug') {
console.log(data);
} else if (type == 'data') {
$(document).trigger('dsa.otr', DSA.parsePrivate(data.key));
}
};

//start worker
worker.postMessage({seed: BigInt.getSeed()});

} else {
//fallback

var dsa = new DSA();

$(document).trigger('dsa.otr', dsa);
}
```