{"name":"sodium-secretstream","version":"1.0.1","description":"Wraps libsodiums secretstream in a higher level abstraction","main":"index.js","dependencies":{"sodium-universal":"^3.0.4"},"devDependencies":{},"repository":{"type":"git","url":"git+https://github.com/mafintosh/sodium-secretstream.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/sodium-secretstream/issues"},"homepage":"https://github.com/mafintosh/sodium-secretstream","gitHead":"ef7bd9be6ef73df6ee500d6d7a397b0f7c81ce01","_id":"sodium-secretstream@1.0.1","_nodeVersion":"15.7.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-hsln2izJxZRR/NIzVoQg8omBOGmHZk+BvOiADMGb4eNcrrjZ13CYfr1Xqb69d6WtRfjlGH3qn43Ikqrca7EXaw==","shasum":"137c0a8c4f0761a0a1e25221e66dcdb2cd545da2","tarball":"http://registry-npm.ywwl.com/sodium-secretstream/download/sodium-secretstream-1.0.1.tgz","fileCount":5,"unpackedSize":5231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdZK4CRA9TVsSAnZWagAAIJYP/3ZjCxi3sgG+yN7cOENQ\n7n0CBPeU3OfFRKRX9D5UVFHzGx7ME0NKVvbbP4BdQw3L0NEyDogtjSeC95Uj\nP1uP/erpQwWtbfOU5stni33xdlM1IBUnKehdoNSbwApKF/CEOuqdBTGCI2kf\nnbnKE4Zv2SAhwtpzfJeh2njZ30vRg4D+fqzfZ0vS98uiYTZR9XacVuMO1agT\nWwztNQGrdMU/RTu8u/idLLRL6xqXQY9pDIzrn6YbKCVZUvwGqFzU9Y2ISBg3\nDQfLfEhlXSfzxKV6R7C7pNWqObMd99MW6BwDXutu6way8VinykoRxgWtJTuT\nEKKqAR1IRjPdhFMUDQTFrJQy6podkJuYnD1rXQI91cUJT6AnRqb19Ow5JIOP\n1RuzfAOFZ8kb6+AePtpcdp8EAiDlmlFyjoSWcbXKJII194yDlIk2QwwZPo5i\nU8PzOlV1o4Tgh5kBMqhgJSH11I5Sy2/eY4H2NDjzSjY3o2TBYW5+dsugElg/\nurUM6ayz8mrfm9vET2s8RLnLw6hMOaYpP5e57FHe0XuOcsVCTnRQ6Rr+drA7\nLHHAussbragNEzq+yuMjz6OyyQo3ig/pyptjfHM9f0FcQ6vSOPgwiBzkLtbO\nkhM9j6rxwQpdHNcxB/Hr7+RpkQcIwkBuFxRSiuM3cIOhAjgA742cWjFqa52v\nXfC5\r\n=a4Pg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDX7yaIQ2omGtg8ojS3Y3hmq/OteZycJSH9uhAGpcKlcgIhANTbDjqT966hDkqSMMeJIP6G3HYn0eoYdYyoTATDFZKW"}],"size":1949,"noattachment":false,"key":"/sodium-secretstream/-/sodium-secretstream-1.0.1.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sodium-secretstream_1.0.1_1618318008059_0.35957400773280024"},"_hasShrinkwrap":false,"readme":"# sodium-secretstream\n\nWraps libsodium's secretstream in a higher level abstraction\n\n```\nnpm install sodium-secretstream\n```\n\n## Usage\n\n``` js\nconst { Pull, Push, keygen } = require('sodium-secretstream')\n\nconst key = keygen()\n\n// the sender\nconst push = new Push(key)\n\n// the receiver\nconst pull = new Pull(key)\n\n// send header to the other side\npull.init(push.header)\n\n// send the cipher to the other side\nconst cipher1 = push.next(Buffer.from('test'))\n\n// prints \"test\"\nconsole.log(pull.next(cipher1))\n\n// send the cipher to the other side\nconst cipher2 = push.next(Buffer.from('test 2'))\n\n// prints \"test 2\"\nconsole.log(pull.next(cipher2))\n\n// when done send a final signal\nconst cipher3 = push.final()\n\n// prints <empty buffer>\nconsole.log(pull.next(cipher3))\n\n// but sets pull.final to true\nconsole.log(pull.final)\n```\n\n## License\n\nMIT\n","publish_time":1618318008277,"_cnpm_publish_time":1618318008277,"dist-tags":{"latest":"1.2.0"}}