{"name":"sodium-secretstream","version":"1.1.0","description":"Wraps libsodiums secretstream in a higher level abstraction","main":"index.js","dependencies":{"b4a":"^1.1.1","sodium-universal":"^4.0.0"},"devDependencies":{"standard":"^17.0.0"},"scripts":{"test":"standard"},"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":"ed74a69e83ee4a1317985a06235052ff76386031","_id":"sodium-secretstream@1.1.0","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-Qg7D2xomELDjDCWAmE4izk1aecG/il8pQIGmSWFaKgah/V58BVWG/PuSZF6vseTpcqnetIFGaOWzmPNzyTD50A==","shasum":"25fec816cd9ae5e2d38d7511b88560debe39179a","tarball":"http://registry-npm.ywwl.com/sodium-secretstream/download/sodium-secretstream-1.1.0.tgz","fileCount":5,"unpackedSize":5484,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCITVBvi+DN5KJTbxK60Mp4RGG4VChaEE7UClNMiEjY0QIhALOx/sW/q70beMvJ1mJZkmVBV4oDPKHWqeYLql9ILHZ4"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvT4XACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqKrA//cvl+jsud9DWMOZ1U09jH8xCd5aZvXZy5VAFKOUgxP38Re1HQ\r\nsi69YWV2liHCbGGfGWsM/84WiJmP811JgerGB1/3GKrHiz90bPSAeeeKSIde\r\nGRmS3UBFIeqQL1WZbhDOgRVoszWRDGPmZgMGnDFzNYKRp0iGTUM8ezD4GKF/\r\nD5y9ewSZmuWPXhEKyA/o8agDVNcLbTcK8C4uXnze3evNoLPhvyVrS5Q8Sv9n\r\nti1rE3XdZcaxkNzAx2sSh3542z/hKIrgizFLA+GB77ONjsTFmbZ+X4Xm4RNy\r\nzgbeTU2KWaJ+unMrpNrKPJS0tuBYHmo6nrbczDgbvC5IiZqOZTpoz93/0GvO\r\nZMc8XS5BsIycRwh/Km4AbnXub5WWtPvPEhXHAS0bo84VgTUbpeGxjo2HFdg/\r\nHC06GpiXPwAfO/zc0P1eIi8yOWl5isvKKHrtu19ggczAbUdNrOAUPDSaV1FH\r\ngCOstdfixwhopjCzuYdAkhuxoy/14e34DzyWNw/x/Fm5mwbeUyTgyQ303625\r\nR/Cx/sVuXf9LvgOh+xYeEh8ez1uSZaJBb94QFOakev94wDNaOJzWqzgewQSy\r\nHbo5riZW/9jZmeChCDwdr4d0Ol7eSuyIU+t1dQFc6migHddD0sZuNYOZo7f5\r\nrbZs1jfL0IVizyin+GvYrWe0nOm3IADaPJ8=\r\n=33/3\r\n-----END PGP SIGNATURE-----\r\n","size":1984,"noattachment":false,"key":"/sodium-secretstream/-/sodium-secretstream-1.1.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_1.1.0_1673346583364_0.5338636563016672"},"_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":1673346583518,"_cnpm_publish_time":1673346583518,"dist-tags":{"latest":"1.2.0"}}