Cable-Desktop/libtextsecure/protocol_wrapper.js

25 lines
763 B
JavaScript
Raw Normal View History

/*
* vim: ts=4:sw=4:expandtab
*/
2015-01-15 00:42:01 +01:00
;(function() {
'use strict';
window.textsecure = window.textsecure || {};
window.textsecure.storage = window.textsecure.storage || {};
2016-04-22 22:39:05 +02:00
textsecure.storage.protocol = new SignalProtocolStore();
2016-04-22 22:40:46 +02:00
var protocolInstance = libsignal.protocol(textsecure.storage.protocol);
window.textsecure = window.textsecure || {};
window.textsecure.protocol_wrapper = {
startWorker: function() {
2016-04-22 22:32:19 +02:00
protocolInstance.startWorker('/js/libsignal-protocol-worker.js');
},
stopWorker: function() {
2016-04-22 22:32:19 +02:00
protocolInstance.stopWorker();
2015-03-17 22:31:33 +01:00
},
createIdentityKeyRecvSocket: function() {
2016-04-22 22:32:19 +02:00
return protocolInstance.createIdentityKeyRecvSocket();
}
};
2015-01-15 00:42:01 +01:00
})();