{"name":"sodium-secretstream","version":"1.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":"7bac928ddca18957eb8bdc382f18e93f46949596","_id":"sodium-secretstream@1.0.0","_nodeVersion":"15.7.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-mbrZ38smF2JuE59URH1W+FyT67MJawkwcNktoBcucNRBRXgu4KbxAjHQmjqFvqDtNIl6qc17piQLw0txUEZiCw==","shasum":"537c2880087a0a6898f92e8b0cd0679cafc2fc55","tarball":"http://registry-npm.ywwl.com/sodium-secretstream/download/sodium-secretstream-1.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\nwsFcBAEBCAAQBQJgISYRCRA9TVsSAnZWagAAW0IQAJ3BAg1JR+Ushf7ENivg\n8/j0qxKVVAvmkpN0g225goWZtfCV+efB05vnX+PYcuzZ1gtWGfLl5FlRbXNN\nI4dz56VrzcXrOcUrmZSo9F5HAk/8SSH7aIB9db6PmuobajP3yKAyerkQ0BRi\nM77H80fpHkbTo0DmHpa4xf+QEWaarA+N3tqc4G/C+HEDAYEdVOORF/nK2EPo\ndrH/xcSTMddUr0Dha5l6OACP8ei6VecMj4jWDkZfFXItBnh1byYl7tODYvA2\nsULZYfZsjFVSMrr5x3owNaIanoDqf677O1iO8Lmo4CQpJqDOegOIFjEBdy8V\nCYMU23nMRvPAaj52XrjTligZ8lS0mYvNAD2TMhYuuqGo0KkYw1oeI7MWgx1V\nRKpJWaqYwDHK1NWTEhvDdjEVFlvT183tuHgEGiBn+DL5QZPVZrx0EZd2W37+\nmZVJD4vGyijybgQ7uhyT0V/ZWPjZ3fP3kMJOeRRBetyndWnGYG/ckBx2r7FV\nLhxzNKoYPXHm+5hG+pGTPj0nGMYHCKSx+8XUA/HGmDVocB6bqoxelN2ZwAoI\nXUkW2biulNuiOaKJBxcNHi81Bm2g6F+wtvOrJAHoJv9GPtcWqPcamNUrNzYq\nxqmr3944hMko6FniAjPCVWFdoiuizTWNRn5MxbI1J2eKerY9j6jkZUs4C3YL\nJ391\r\n=HZU6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEhbAm2ebiW1ETeKzuV/oFgjSJOFe3aFJXl+6QXJyqafAiBE9gJYq7wTUg04M/yuRR7m+vIH74iQ7Z5bwZeK1pz9Vw=="}],"size":1892,"noattachment":false,"key":"/sodium-secretstream/-/sodium-secretstream-1.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_1.0.0_1612785168533_0.1190372455840194"},"_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":1612785168666,"_cnpm_publish_time":1612785168666,"dist-tags":{"latest":"1.2.0"}}