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.
gunMsging.js
//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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment