Use a worker to facilitate key generation
This commit is contained in:
parent
f465bdddbf
commit
7d0aeac8cb
5 changed files with 14 additions and 18 deletions
|
@ -55,14 +55,11 @@
|
|||
encryptMessageFor: function(deviceObject, pushMessageContent) {
|
||||
return axolotlInstance.encryptMessageFor(deviceObject, pushMessageContent);
|
||||
},
|
||||
generateKeys: function(count, progressCallback) {
|
||||
if (textsecure.worker_path) {
|
||||
axolotlInstance.startWorker(textsecure.worker_path);
|
||||
}
|
||||
return generateKeys(count, progressCallback).then(function(result) {
|
||||
axolotlInstance.stopWorker();
|
||||
return result;
|
||||
});
|
||||
startWorker: function() {
|
||||
axolotlInstance.startWorker('/js/libaxolotl-worker.js');
|
||||
},
|
||||
stopWorker: function() {
|
||||
axolotlInstance.stopWorker();
|
||||
},
|
||||
createIdentityKeyRecvSocket: function() {
|
||||
return axolotlInstance.createIdentityKeyRecvSocket();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue