{"_id":"xsalsa20","_rev":"1645542","name":"xsalsa20","description":"XSalsa20 implemented in Javascript and WebAssembly","dist-tags":{"latest":"1.2.0"},"maintainers":[{"name":"mafintosh","email":""}],"time":{"modified":"2021-11-22T11:56:04.000Z","created":"2017-06-27T22:35:24.692Z","1.2.0":"2021-11-22T11:42:04.540Z","1.1.0":"2019-11-13T18:38:50.256Z","1.0.2":"2017-06-28T08:56:12.155Z","1.0.1":"2017-06-28T07:37:33.659Z","1.0.0":"2017-06-27T22:35:24.692Z"},"users":{},"author":{"name":"Mathias Buus","url":"@mafintosh"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/xsalsa20.git"},"versions":{"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":{"shasum":"e5a05cb26f8cef723f94a559102ed50c1b44c25c","size":9775,"noattachment":false,"key":"/xsalsa20/-/xsalsa20-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/xsalsa20/download/xsalsa20-1.2.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xsalsa20_1.2.0_1637581324403_0.8391255457496523"},"_hasShrinkwrap":false,"publish_time":1637581324540,"_cnpm_publish_time":1637581324540},"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":{"shasum":"bee27174af1913aaec0fe677d8ba161ec12bf87d","size":9576,"noattachment":false,"key":"/xsalsa20/-/xsalsa20-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/xsalsa20/download/xsalsa20-1.1.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"_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,"publish_time":1573670330256,"_cnpm_publish_time":1573670330256},"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":{"shasum":"46cc53439d543d88782e42dfada5c5a69ab6314d","size":9468,"noattachment":false,"key":"/xsalsa20/-/xsalsa20-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/xsalsa20/download/xsalsa20-1.0.2.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xsalsa20-1.0.2.tgz_1498640171234_0.03981066425330937"},"directories":{},"publish_time":1498640172155,"_hasShrinkwrap":false,"_cnpm_publish_time":1498640172155},"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":{"shasum":"7490c23aa3b89d81caf648b22e8512b39455ad36","size":9397,"noattachment":false,"key":"/xsalsa20/-/xsalsa20-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/xsalsa20/download/xsalsa20-1.0.1.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xsalsa20-1.0.1.tgz_1498635452683_0.504042703891173"},"directories":{},"publish_time":1498635453659,"_hasShrinkwrap":false,"_cnpm_publish_time":1498635453659},"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":{"shasum":"c97049841ebb8bb6501d954f88c24dff2392b501","size":9378,"noattachment":false,"key":"/xsalsa20/-/xsalsa20-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/xsalsa20/download/xsalsa20-1.0.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xsalsa20-1.0.0.tgz_1498602923670_0.6991796055808663"},"directories":{},"publish_time":1498602924692,"_hasShrinkwrap":false,"_cnpm_publish_time":1498602924692}},"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","_attachments":{},"homepage":"https://github.com/mafintosh/xsalsa20","bugs":{"url":"https://github.com/mafintosh/xsalsa20/issues"},"license":"MIT"}