Skip to content

Instantly share code, notes, and snippets.

@marcus7777
Created August 26, 2019 07:29
Show Gist options
  • Save marcus7777/8dd6e3c3e00b78c43e51ccec48c8ca68 to your computer and use it in GitHub Desktop.
Save marcus7777/8dd6e3c3e00b78c43e51ccec48c8ca68 to your computer and use it in GitHub Desktop.

Revisions

  1. marcus7777 created this gist Aug 26, 2019.
    6 changes: 6 additions & 0 deletions gunMsging.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    //Alice's Side
    var sharedKey = SEA.secret(BobePub, myPair (access via gun._.SEA))
    var encMessage = SEA.encrypt(msg, sharedKey)
    //on other side, Bob
    var sharedKey = SEA.secret(AliceEPub, Bob.pair)
    var decryptMessage = SEA.decrypt(encMessage, sharedKey)