Fix NaCL (maybe it should be removed?)
This commit is contained in:
parent
6bc19ef558
commit
4efb8a2616
1 changed files with 3 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue