Fix NaCL (maybe it should be removed?)

This commit is contained in:
Matt Corallo 2014-05-17 01:55:32 -04:00
parent 6bc19ef558
commit 4efb8a2616

View file

@ -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 {