signal-desktop/libtextsecure/protocol_wrapper.js

25 lines
763 B
JavaScript
Raw Normal View History

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