2015-09-26 02:25:25 +02:00
|
|
|
/*
|
|
|
|
* vim: ts=4:sw=4:expandtab
|
|
|
|
*/
|
2015-01-15 00:42:01 +01:00
|
|
|
;(function() {
|
2015-04-01 22:08:09 +02:00
|
|
|
'use strict';
|
|
|
|
window.textsecure = window.textsecure || {};
|
|
|
|
window.textsecure.storage = window.textsecure.storage || {};
|
2015-09-26 02:25:25 +02:00
|
|
|
|
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);
|
2015-01-15 21:42:32 +01:00
|
|
|
|
|
|
|
window.textsecure = window.textsecure || {};
|
|
|
|
window.textsecure.protocol_wrapper = {
|
2015-05-04 20:55:47 +02:00
|
|
|
startWorker: function() {
|
2016-04-22 22:32:19 +02:00
|
|
|
protocolInstance.startWorker('/js/libsignal-protocol-worker.js');
|
2015-05-04 20:55:47 +02:00
|
|
|
},
|
|
|
|
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-07-31 21:11:17 +02:00
|
|
|
}
|
2015-06-01 23:08:21 +02:00
|
|
|
};
|
2015-01-15 00:42:01 +01:00
|
|
|
})();
|