Skip to content

Commit

Permalink
Fix bug in shared key generation
Browse files Browse the repository at this point in the history
  • Loading branch information
CMEONE committed Apr 27, 2021
1 parent 516d0df commit f7e70cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tenvoy.js
Original file line number Diff line number Diff line change
Expand Up @@ -45665,7 +45665,7 @@ function tEnvoy(openpgpRef = window.openpgp, naclRef = window.nacl, sjclRef = wi

Object.defineProperty(this, "version", {
get: () => {
return "v6.0.0";
return "v6.0.1";
}
});

Expand Down Expand Up @@ -47290,7 +47290,7 @@ function tEnvoyNaClKey(key, type = "secret", password = null, passwordProtected
let sharedKey = _nacl.box.before(this.getPublic(_password), otherKey.getPrivate(otherKeyPassword));
return new tEnvoyNaClKey(sharedKey, "shared", _password, _passwordProtected, _tEnvoy);
} else if(_type == "private" && otherKey.getType() == "public") {
let sharedKey = _nacl.box.before(this.getPrivate(_password), other.getPublic(otherKeyPassword));
let sharedKey = _nacl.box.before(otherKey.getPublic(otherKeyPassword), this.getPrivate(_password));
return new tEnvoyNaClKey(sharedKey, "shared", _password, _passwordProtected, _tEnvoy);
} else {
throw "tEnvoyNaClKey Fatal Error: Incompatible key types, one key should be public, and the other should be private.";
Expand Down

0 comments on commit f7e70cb

Please sign in to comment.