{"name":"sodium-secretstream","version":"1.0.2","description":"Wraps libsodiums secretstream in a higher level abstraction","main":"index.js","dependencies":{"b4a":"^1.1.1","sodium-universal":"^3.0.4"},"devDependencies":{"standard":"^16.0.4"},"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":"97d138550b08412212fa48df39be122dc72f0128","_id":"sodium-secretstream@1.0.2","_nodeVersion":"16.8.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-AsWztbBHhHid+w5g28ftXA0mTrS52Dup7FYI0GR7ri1TQTlVsw0z//FNlhIqWsgtBctO/DxQosacbElCpmdcZw==","shasum":"ae6fec16555f1a1d9fd2460b41256736d5044e13","tarball":"http://registry-npm.ywwl.com/sodium-secretstream/download/sodium-secretstream-1.0.2.tgz","fileCount":6,"unpackedSize":5928,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhm3sLCRA9TVsSAnZWagAAH68P/3P5/3rbWAcHW1jGaF8b\nw6WjdQYDe9zqSkQWYcx3xa24u7xUMPxE+l0KQ/WDXCDZU8+EbCyoDFqUSS8t\nbFfQVovSXCUooYmT9VYhB1db7+jMrCPZ/7T3m4fBT+BUemR+VpEkMUczAt1e\nUc0aIUsaeGe6vAnlJNOt43BVNcqz+mrTmI2zHnlCmXqSatjttGt0KrJ7RdUV\nP+LeL3lnwwMNST9xWKA4S8mROQSl6VSGZYVaOhTi+Ny7J86GdwZms5Fh8W07\n9Tze/YQStNq5+cbVgbWAdL0bq9jdxAP6CDT5H8qGnbD2WvNHzaVPbV2dK0Yy\nEusXMUZu1ROrZVP8CoV6UQf8lpuQB4iJrpHsKMRyzT04Kedj4zs5HgpgB4S3\n7Ct8psohX3N8WaP0/DEZ3t9x/KbE2V7DY6Znas0bMVBP6pfFnF7Dj7XUBuup\nrTcCyL2dY5PkCDfE4bxM0KG35/yI8h0KESbH8+MLPPmWD+GvM+gSv9j4oBFr\n4Hnn9aOGZYnDUCOVMoMDSaMzwnGreqBj5TRdyQQoz7VTF0UJIMicnGTTshwx\n/PvGZS4h4HfWA+TC6ZtgH0S1Wf8fF94MYPEEDy4gohP1lbXwyWx3bHKYN6WT\nNdVYKJk7F9kThE94VkBkfuayLi4pzeqQmyul0fk1sy2CFP9Wv1QqRVIrQbTg\nDeID\r\n=d1OT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA4OC8H5RzdFXhNNAdNqZr0qzfNDsxT76nmwj6EMPqzyAiBqIp3ORGwc7cbwZ6Ac72WeZf/dmbnjLA+detu5JyuNgQ=="}],"size":2097,"noattachment":false,"key":"/sodium-secretstream/-/sodium-secretstream-1.0.2.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.2_1637579531165_0.4666478155873073"},"_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":1637579531318,"_cnpm_publish_time":1637579531318,"dist-tags":{"latest":"1.2.0"}}