{"_id":"xsalsa20","_rev":"5-cb33973e24912d8ec53d8bf45b285782","name":"xsalsa20","description":"XSalsa20 implemented in Javascript and WebAssembly","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"xsalsa20","version":"1.0.0","description":"XSalsa20 implemented in Javascript and WebAssembly","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.6.3"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/xsalsa20.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/xsalsa20/issues"},"homepage":"https://github.com/mafintosh/xsalsa20","gitHead":"e1f60d98aee999585859036dc85202cae14f256b","_id":"xsalsa20@1.0.0","_npmVersion":"5.0.3","_nodeVersion":"8.1.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"integrity":"sha512-bCjOiHxRxP7HUdIzfvsuyQry4sRvKnywJwI+zIN3vF9KfkOHFvpIHmjSViPqXL+tAp8J2wJ54jZSfMQVRiSwKA==","shasum":"c97049841ebb8bb6501d954f88c24dff2392b501","tarball":"https://registry.npmjs.org/xsalsa20/-/xsalsa20-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDuVfmVjitTipxi/Vt8c+OohzkBJiua5akPEyVV0m1YxAiEAzAnBjH69tFziCQfpiiM1mvNzhfOou7t3LzXVT0icQ1M="}]},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xsalsa20-1.0.0.tgz_1498602923670_0.6991796055808663"},"directories":{}},"1.0.1":{"name":"xsalsa20","version":"1.0.1","description":"XSalsa20 implemented in Javascript and WebAssembly","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.6.3"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/xsalsa20.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/xsalsa20/issues"},"homepage":"https://github.com/mafintosh/xsalsa20","gitHead":"28c66472fe67817200ffcc1b86704c3836119e04","_id":"xsalsa20@1.0.1","_npmVersion":"5.0.3","_nodeVersion":"8.1.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"integrity":"sha512-W9IjXZikW0JYy+umJxi5Np5VdKBHO5gL7h5nfdgFphPRrMbo/C39TQPoWX0VQVeA0+Bi21EbwMWJMi+Ac280lQ==","shasum":"7490c23aa3b89d81caf648b22e8512b39455ad36","tarball":"https://registry.npmjs.org/xsalsa20/-/xsalsa20-1.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCPYUqCPy5YxXnkjeMOZealb2j1hVwgyx5fgK0hmqfwwIhAKpp6pfFybFyRYokDokUYUU2DS9QhU6bpWyEKBxTeHLn"}]},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xsalsa20-1.0.1.tgz_1498635452683_0.504042703891173"},"directories":{}},"1.0.2":{"name":"xsalsa20","version":"1.0.2","description":"XSalsa20 implemented in Javascript and WebAssembly","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.6.3"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/xsalsa20.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/xsalsa20/issues"},"homepage":"https://github.com/mafintosh/xsalsa20","gitHead":"305af329284eb14afb6f4f8aed4b9d9414c07b5f","_id":"xsalsa20@1.0.2","_npmVersion":"5.0.3","_nodeVersion":"8.1.1","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"integrity":"sha512-g1DFmZ5JJ9Qzvt4dMw6m9IydqoCSP381ucU5zm46Owbk3bwmqAr8eEJirOPc7PrXRn45drzOpAyDp8jsnoyXyw==","shasum":"46cc53439d543d88782e42dfada5c5a69ab6314d","tarball":"https://registry.npmjs.org/xsalsa20/-/xsalsa20-1.0.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOtXujJAz2RhtlaPpgyOm47Aq0uHR9eqq7m0RlZdEg8wIgZwKmWo9eF+sxuxr57KVUXK/pzPaL+ZDpSGPOWOW5yS0="}]},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xsalsa20-1.0.2.tgz_1498640171234_0.03981066425330937"},"directories":{}},"1.1.0":{"name":"xsalsa20","version":"1.1.0","description":"XSalsa20 implemented in Javascript and WebAssembly","main":"index.js","dependencies":{},"devDependencies":{"tape":"^4.6.3"},"scripts":{"test":"tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/xsalsa20.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/xsalsa20/issues"},"homepage":"https://github.com/mafintosh/xsalsa20","gitHead":"5698d90b3b1b538512168191b43043437b7b118f","_id":"xsalsa20@1.1.0","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-zd3ytX2cm+tcSndRU+krm0eL4TMMpZE7evs5hLRAoOy6gviqLfe3qOlkjF3i5SeAkQUCeJk0lJZrEU56kHRfWw==","shasum":"bee27174af1913aaec0fe677d8ba161ec12bf87d","tarball":"https://registry.npmjs.org/xsalsa20/-/xsalsa20-1.1.0.tgz","fileCount":8,"unpackedSize":46986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzE26CRA9TVsSAnZWagAAOssP/2PCyc6/A1Lff+BgtGFO\nE1ymV0aKo01dYHzupgJ2T9cTvW0+5sDuocCVMa5v7RjcwknCMdHS3zISQRXc\n33xrLqihx8LRvaHClVQczqNGSUV85/JgAJqcLrtnD37ru2zys0hlA0ghVnwC\ngZrM5WlIhsG2GV230TDGi77jfxmk6c1TwU9FvUBvCNiwl42zlqYOIDh2kAS8\nN7u8vqzv3hOhki/EO60EGtJ+lyTFzHU/CY1xCLrYT9uyk/JkdtLfqXu1NeHw\nHPFbA55TmSCUzMfUOA1J7mijn8IpE1SAfODQ4B9+YFMSu/cCwLjkcs9QNYPu\nlVfBO6BgfrD7z9yfiv9PCIyyaMdH5VDIA8S7GRjfX8TY3G8FT1Hn9WsIYrVF\njZcmdosic2vc6GWwsK+xJ2AipzWjQqsChLkzKBU4zdy5YRiUHlUi529VuN14\nmIiaHr+qtQSdtKKhRGOO2loRtaRjlErVtOEuLHkgdi07gVpStgE/Mc1Fgwb2\nHKA5bC1qp1dB+mqJy75lEZrp5SRmpx35tlXNQ3efoZkcqxHOMt5ilu8T+Rro\nehjCOLMzBHw6C7KgnwlohAaVXCh9J1HJ2S2YoxAHWaEbH3SOcoyWl4S4o2T6\nqWjOPcrgCbYaXIonCFEYfssk4XgbBw8sc+cAzI/zYR/nr95PXKUU3LAMIaVg\nwlDi\r\n=/Lyp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHJ6ZFVA7ZypK7+Rtyw+kMYcug788yvHJpu7kehLFsnRAiBMPW2ZbfBf4IXjEFEvTLiLSJXiEtV8Q9NtujIqJLHmvQ=="}]},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xsalsa20_1.1.0_1573670330043_0.5628092698870093"},"_hasShrinkwrap":false},"1.2.0":{"name":"xsalsa20","version":"1.2.0","description":"XSalsa20 implemented in Javascript and WebAssembly","main":"index.js","devDependencies":{"b4a":"^1.1.3","tape":"^4.6.3","wasm-tools":"^0.2.0"},"scripts":{"test":"tape test.js","compile":"wasm-to-js -sf cjs xsalsa20.wat > xsalsa20.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/xsalsa20.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/xsalsa20/issues"},"homepage":"https://github.com/mafintosh/xsalsa20","gitHead":"1d57fdd0bae91d7a45c3b07a2ca06003b683a49b","_id":"xsalsa20@1.2.0","_nodeVersion":"16.8.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-FIr/DEeoHfj7ftfylnoFt3rAIRoWXpx2AoDfrT2qD2wtp7Dp+COajvs/Icb7uHqRW9m60f5iXZwdsJJO3kvb7w==","shasum":"e5a05cb26f8cef723f94a559102ed50c1b44c25c","tarball":"https://registry.npmjs.org/xsalsa20/-/xsalsa20-1.2.0.tgz","fileCount":8,"unpackedSize":47329,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhm4IMCRA9TVsSAnZWagAAqxMP/0tBfaR0vyG9m8QnyDpE\no5Mv/Kw/H9Pu2M+K7ofCbwGT9lrq2twetTmwpEoQrOE2Z18xeTYyH1vCFF8h\nfr10L4WOWQ5/afu3xCrLSWffLGZPZy1NcXk4UJl3h5xoUsfmFuwJg3ZO21sh\npIVW4ng2Ft5bB+NdOTy7BaPwLthaLw7lYOU1wjGSGnVRc4/aVm/mdj3GHnr4\nUWSfRFJbp3SlwwHCAhewkiSK9y/oZb3XRzyd5lbJYvwH8RkesHndMC3je4LB\n1XgzN8FGI5F0KosQv1b6sIea+XlcNOy9JP0F7gkaU3ZHBBJTLVhhjo36obwi\nAvKBb+km1v1d62OdqTq0Di15joTw8iEwrrqp2AV/wJSKYAvdoqbTyU3esy9t\nHB3xAURPtF8EE0Evs/Q3uckUiFUi+0bQlLIW5SfIp/MVlvIEgHHGWUKAj1ky\n+f43pahdiAHEEQMudAYoYe9IWnREh0VJO3E8bq47tpy6KcoQWhVqpWOEUm21\nSEY57SUjr8lJuYPX6Ty6FBeLTVBp//63Ehl9HYBc2j8PO+qm2YWN9qkxnUOC\nHAm9EicamERsze4TRXtxt6o4SeYGUgXpDanVnCP6dM0GV985Mcs9NRntK4oM\n7qYVf57gjjPkdqX0ZrRShKNE2ELTVTDp0Pj887y7Mt3trq6ghV/tct5N8pAN\n+efP\r\n=aIyj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7ye42s9FKDVUU0nQoRjxeH1lB8QUcTvvXU8lYCJ7e8AIgdoQSiCvO2AhHTxIWghoRMiXamiwAw3S30lUyq3DLutI="}]},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xsalsa20_1.2.0_1637581324403_0.8391255457496523"},"_hasShrinkwrap":false}},"readme":"# xsalsa20\n\nXSalsa20 implemented in Javascript and WebAssembly.\n\n```\nnpm install xsalsa20\n```\n\n[![build status](https://travis-ci.org/mafintosh/xsalsa20.svg?branch=master)](https://travis-ci.org/mafintosh/xsalsa20)\n\n\n## Usage\n\n``` js\nvar crypto = require('crypto')\nvar xsalsa20 = require('xsalsa20')\nvar key = crypto.randomBytes(32)\nvar nonce = crypto.randomBytes(24)\n\nvar xor = xsalsa20(nonce, key)\n\nconsole.log(xor.update(Buffer.from('hello')))\nconsole.log(xor.update(Buffer.from('world')))\n\nxor.finalize()\n```\n\n## API\n\n#### `var xor = xsalsa20(nonce, key)`\n\nCreate a new xor instance.\n\nNonce should be a 24 byte buffer/uint8array and key should be 32 bytes.\n\n#### `var output = xor.update(input, [output])`\n\nUpdate the xor instance with a new input buffer. Optionally you can pass in an output buffer.\n\n#### `xor.finalize()`\n\nCall this method last. Clears internal state.\n\n## Contributing\n\nThe bulk of this module is implemented in WebAssembly in the [xsalsa20.wat](xsalsa20.wat) file. To build the thin Javascript wrapper do:\n\n```\nnpm run compile\n```\n\n## License\n\nMIT\n","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"time":{"modified":"2022-05-25T01:15:50.998Z","created":"2017-06-27T22:35:24.692Z","1.0.0":"2017-06-27T22:35:24.692Z","1.0.1":"2017-06-28T07:37:33.659Z","1.0.2":"2017-06-28T08:56:12.155Z","1.1.0":"2019-11-13T18:38:50.256Z","1.2.0":"2021-11-22T11:42:04.540Z"},"homepage":"https://github.com/mafintosh/xsalsa20","repository":{"type":"git","url":"git+https://github.com/mafintosh/xsalsa20.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"bugs":{"url":"https://github.com/mafintosh/xsalsa20/issues"},"license":"MIT","readmeFilename":"README.md"}