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