{"name":"sodium-secretstream","version":"0.0.0","description":"Wraps libsodiums secretstream in a higher level abstraction","main":"index.js","dependencies":{},"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":"a339f8dc1443ece2bba4e804bdfe3bf7903d04f7","_id":"sodium-secretstream@0.0.0","_nodeVersion":"15.7.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-Ml0N+uyTCkX/LYxss8J9dhY3f+Uicf5UpXqlAu0EHg47hkulo6rgC5X9/o/S9KsZF30YQ/MWW6XY+FuAws29sQ==","shasum":"9cbb1d72cc1b96d3337d73afade20e4f6780a488","tarball":"http://registry-npm.ywwl.com/sodium-secretstream/download/sodium-secretstream-0.0.0.tgz","fileCount":5,"unpackedSize":5079,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIRydCRA9TVsSAnZWagAADZ0P/1ksb8430tjNPdEfJLCi\ngVLKmqXerv6uv3mCTsjog/vMsUnl2wQX6b6jkuG70tBZucu7RZJGtnJWJkW0\nR3WMbpC2d/gx73cztSc/KvxqZLwvMDYSpOgBlXVa+HiY0JxiEzX8SPk29Yd6\nX/ecGFYQQDFWpl8wqNBq1xQ68PveIktbwdun5hMSlRopBlPRakvZ/51OPhNF\nexiabq+RZsCHG1izlLWS27v/wFxJg5Ufnw91KBXQY6HToRqzIfHqnYMygjPh\nhCn+VAPz9TM9kwGrXn3GJxlMGskirMwtm0T04lEZIw5UfCl4/6fbXiY2hpuU\n7jDlkYstwwn9NbXOmRGbo2Zgj/LNPZJNDLsHIeUZLXxPchxxp5VSw+p0Ljbr\nrpJY8VhTMt+fZtGaTUEPXbVFhoz+zLljROWJb93BLAg8DxRNa2JuceBp1zUv\na3Ij7wQF9zxSOhseRYHGGJ+Mxz3r9B8oadmcDWU07Jzden7jhXqXt/m8xJj9\nYj945S4Mmt3pKA6zgfALwsjk96c0lsWoJuRpE79YsqgIsy6mKFE4Y15nuAdq\nim5Y5bLSPTP3Bd2HKmI6v0nLb+rHIU0Ztqc+ng3Mwhy1gtu/iIrXpRxDsAab\n9gvWcV/aCSyfznAHQuhdn2ozfMJ6/sDPhXd+lovpqW1vZpcOTFnezEO8PVpC\nGGnf\r\n=sYdF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAj8drBBH9Xl0UuSivoqQg5p4dcHyoZ5I1cH6kzQkV+RAiEAgOj+2JlIO6nckhRIHiGPAc5+bRuQm5z/1FWOJvmOiBo="}],"size":1891,"noattachment":false,"key":"/sodium-secretstream/-/sodium-secretstream-0.0.0.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_0.0.0_1612782748716_0.6997114715670267"},"_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":1612782748840,"_cnpm_publish_time":1612782748840,"dist-tags":{"latest":"1.2.0"}}