From 4efb8a26168c239632c36c112e493420a0685574 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 17 May 2014 01:55:32 -0400 Subject: [PATCH] Fix NaCL (maybe it should be removed?) --- js/crypto.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/crypto.js b/js/crypto.js index 5a70a10835..4f79aa1cb7 100644 --- a/js/crypto.js +++ b/js/crypto.js @@ -69,11 +69,11 @@ window.textsecure.crypto = new function() { } if (textsecure.nacl.USE_NACL) { - return postNaclMessage({command: "bytesToPriv", priv: privKey}).then(function(message) { + return textsecure.nacl.postNaclMessage({command: "bytesToPriv", priv: privKey}).then(function(message) { var priv = message.res; if (!isIdentity) new Uint8Array(priv)[0] |= 0x01; - return postNaclMessage({command: "privToPub", priv: priv}).then(function(message) { + return textsecure.nacl.postNaclMessage({command: "privToPub", priv: priv}).then(function(message) { return { pubKey: prependVersion(message.res), privKey: priv }; }); }); @@ -240,7 +240,7 @@ window.textsecure.crypto = new function() { return new Promise(function(resolve) { if (textsecure.nacl.USE_NACL) { - postNaclMessage({command: "ECDHE", priv: privKey, pub: pubKey}).then(function(message) { + textsecure.nacl.postNaclMessage({command: "ECDHE", priv: privKey, pub: pubKey}).then(function(message) { resolve(message.res); }); } else {