diff options
| -rw-r--r-- | bog.js | 4 | 
1 files changed, 0 insertions, 4 deletions
| @@ -70,13 +70,9 @@ async function box (msg, recp, keys) {  //bog.unbox -- decrypts a message sent to our pubkey  async function unbox (boxed, sender, keys) { -  console.log(sender) -  console.log(keys.privateKey) -  console.log(boxed)    var nonceMsg = nacl.util.decodeBase64(boxed)    var nonce = nonceMsg.slice(0, nacl.box.nonceLength)    var msg = nonceMsg.slice(nacl.box.nonceLength, nonceMsg.length) -  //var message = nacl.box.open(msg, nonce, ed2curve.convertPublicKey(sender.substring(1)), ed2curve.convertSecretKey(nacl.util.decodeBase64(keys.privateKey)))    var message = nacl.box.open(msg, nonce, ed2curve.convertPublicKey(nacl.util.decodeBase64(sender.substring(1))), ed2curve.convertSecretKey(nacl.util.decodeBase64(keys.privateKey)))    return message  } | 
