{"_id":"@aloe2/blake2b-wasm","name":"@aloe2/blake2b-wasm","dist-tags":{"aloe-bbc82c9c9":"3.0.20228282226","latest":"3.0.20228282226"},"versions":{"3.0.20228282226":{"name":"@aloe2/blake2b-wasm","version":"3.0.20228282226","description":"Blake2b implemented in WASM","main":"index.js","dependencies":{"nanoassert":"^1.0.0"},"publishConfig":{"access":"public"},"devDependencies":{"browserify":"^14.4.0","tape":"^4.6.3","wat2js":"^1.1.1"},"scripts":{"compile":"wat2js blake2b.wat -o blake2b.js","demo":"browserify example.js > bundle.js","unit-test":"tape test.js || true"},"repository":{"type":"git","url":"git+https://github.com/BitGo/BitGoJS.git","directory":"modules/blake2b-wasm"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/blake2b-wasm/issues"},"homepage":"https://github.com/mafintosh/blake2b-wasm","gitHead":"ff34e1949ea30d3016d4a8e17d459eee4436eda5","_id":"@aloe2/blake2b-wasm@3.0.20228282226","_nodeVersion":"14.18.0","_npmVersion":"lerna/5.5.0/node@v14.18.0+x64 (darwin)","dist":{"integrity":"sha512-zg+u5BBXVuTB0Sw6K0z32+yZSPjSrKHpqoQE5RgQAOnPTDd3biDU7dUP5/lih5ccBtqcX3Tz32UneOtbzrT0nw==","shasum":"27ac542aa78a8c615c8b0532fa4c6247bdd7b7cb","tarball":"https://registry.npmjs.org/@aloe2/blake2b-wasm/-/blake2b-wasm-3.0.20228282226.tgz","fileCount":12,"unpackedSize":134686,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICacockDwKQgzlFeMRYtkj2EZwpDWIY1HhiPHAnFIHnFAiATQPGwLjy6WpwnuI5yYsmRv57zpBkAonttbXkZk0iaBg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNS5SACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCDQ/8DiS442DZpUh+Yeh5gtQOyU5es0DvgMxjMfKRTjgVKijzF87B\r\nJ00eq5qNJl+QO9NjG4JUetLUWaPhOXLupJV+gCsFrThP8SZSkv6S/FEalgkh\r\nYUkDb5itGl8RXMwhahb55677ScJ3IWNisEtYSbnYZKSqQhGNKtkDzFZ2i8JI\r\nDtgIA9vDNtEz65cWcGYhhI9PnnSJ3BG4JfGlWqnt6E0mSzS9LgMHVXfBFEj4\r\nhXVu8tp255HrhcYMvzGN4MuRxuqGTzpAazu8Z/sUiDaR6WFzi9h5VKUuIwDB\r\nko4X/dg5Us/mxiNyQrvkBFM6CTjt1dcRs3B0Va3s2fI2uoh9PEHI/dP5Nr4O\r\nEw5WiRzH/E1sF2F/r0NKH4/2pdAOijsWDpWvVcpkJ7L6e+Ksw74/qqSy8wYu\r\nVaR+NYGIBNM7BB64HpsMRog7d/4SWrzQR93DdNmTJUPHfRFfcWDu5Qr5fCyM\r\nsKbjNrVJqZQfGmBEOSjIGaAMUWMVGgC/mSlusCc53tFdh9+M+z52yMZCa6v6\r\npXmsckwxB1mauPiet2EUeLMj78NgSEAE020DBemfvJNrU4LXvP9J3rOo3HfV\r\nnKOnLOyhyeE5x/EEP01xhMtOzwTTy09YLUm01Lx2mFVbR/9WXkTufrYhYbGK\r\nszeclG0QS1sTwJ/O2JzxEMRuAV7VG+eH6As=\r\n=3ab4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aaronloe","email":"aaronloe@gmail.com"},"directories":{},"maintainers":[{"name":"aaronloe","email":"aaronloe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/blake2b-wasm_3.0.20228282226_1664429650049_0.13566344404061126"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-29T05:34:09.963Z","3.0.20228282226":"2022-09-29T05:34:10.214Z","modified":"2022-09-29T05:34:10.398Z"},"maintainers":[{"name":"aaronloe","email":"aaronloe@gmail.com"}],"description":"Blake2b implemented in WASM","homepage":"https://github.com/mafintosh/blake2b-wasm","repository":{"type":"git","url":"git+https://github.com/BitGo/BitGoJS.git","directory":"modules/blake2b-wasm"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"bugs":{"url":"https://github.com/mafintosh/blake2b-wasm/issues"},"license":"MIT","readme":"# blake2b-wasm\n\nBlake2b implemented in WASM\n\n```\nnpm install @bitgo/blake2b-wasm\n```\n\nWorks in browsers that support WASM and Node.js 8+.\n\n## Usage\n\n``` js\nvar blake2b = require('@bitgo/blake2b-wasm')\n\nif (!blake2b.SUPPORTED) {\n  console.log('WebAssembly not supported by your runtime')\n}\n\nblake2b.ready(function (err) {\n  if (err) throw err\n\n  var hash = blake2b()\n    .update(Buffer.from('hello')) // pass in a buffer or uint8array\n    .update(Buffer.from(' '))\n    .update(Buffer.from('world'))\n    .digest('hex')\n\n  console.log('Blake2b hash of \"hello world\" is %s', hash)\n})\n```\n\n## API\n\n#### `var hash = blake2b([digestLength], [key], [salt], [personal])`\n\nCreate a new hash instance. `digestLength` defaults to `32`.\n\n#### `hash.update(data)`\n\nUpdate the hash with a new piece of data. `data` should be a buffer or uint8array.\n\n#### `var digest = hash.digest([enc])`\n\nDigest the hash.\n\n#### `var promise = blake2b.ready([cb])`\n\nWait for the WASM code to load. Returns the WebAssembly instance promise as well for convenience.\nYou have to call this at least once before instantiating the hash.\n\n## Browser demo\n\nThere is a browser example included in [example.html](example.html) and [example.js](example.js).\n\n## Contributing\n\nThe bulk of this module is implemented in WebAssembly in the [blake2b.wat](blake2b.wat) file.\nThe format of this file is S-Expressions that can be compiled to their binary WASM representation by doing\n\n```\nwat2wasm blake2b.wat -o blake2b.wasm\n```\n\nTo build the thin JavaScript wrapper for the WASM module use `wat2js`:\n\n```\n# also available as `npm run compile`\nwat2js blake2b.wat -o blake2b.js\n```\n\nIf you do not have `wat2wasm` installed follow the instructions here, https://github.com/WebAssembly/wabt\n\n## License\n\nMIT\n","readmeFilename":"README.md"}