mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-21 00:48:19 +01:00
Use a worker to facilitate key generation
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user