{"name":"blake2b-wasm","version":"2.4.0","description":"Blake2b implemented in WASM","main":"index.js","dependencies":{"b4a":"^1.0.1","nanoassert":"^2.0.0"},"devDependencies":{"blake2b":"^1.2.0","browserify":"^14.4.0","tape":"^4.6.3","wasm-tools":"^0.2.0"},"scripts":{"compile":"wasm-to-js -f cjs blake2b.wat > blake2b.js","demo":"browserify example.js > bundle.js","test":"tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/blake2b-wasm.git"},"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":"7d8efa4f71d71983bc87983b25c6c9513fb9d1a0","_id":"blake2b-wasm@2.4.0","_nodeVersion":"16.8.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-S1kwmW2ZhZFFFOghcx73+ZajEfKBqhP82JMssxtLVMxlaPea1p9uoLiUZ5WYyHn0KddwbLc+0vh4wR0KBNoT5w==","shasum":"9115649111edbbd87eb24ce7c04b427e4e2be5be","tarball":"http://registry-npm.ywwl.com/blake2b-wasm/download/blake2b-wasm-2.4.0.tgz","fileCount":11,"unpackedSize":125938,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhm38ACRA9TVsSAnZWagAAbBQP/2N6ORG/k7BCsCTIOSRN\nc+1tHtQH8IhcrXspJkBPKBwyQa18Fe8NrjLaAPJpJdy0Q9m8G7I7/5IWlw2M\n49HLExHx0KPfaVyfikfdyd1jWuNLOpmLpwjjW/2mHMC56ecl9zzTzPCPehUy\nSnp2/VwsefgQ4bRrx4mDxWTs91kVNwPSRvAqC5UBSoQvCegaOc11f50+FwK6\nq1QH5IsKWvPNVqHwHNpBd0QEcpzWURcGurGJgVzmdPoPZp+1J1VGilVJxNru\nb9pLOdXkwo8H7+gG5kSnhah/ZJwf27jA/U5ojUPYJbjQX6l2B7WKRXQhgZTN\nM5eKzJDEtOWgLz1DeS0jp3d2Dw0pJZLw4p0AG3db4QZUZtlD2MAXTY7DLStA\nzEeeWuEZ6R5o8YcSaFGKChsh6RItv3P1tp2VyH7xjFITBit+AAAsSOvNxb3I\nvFDrRdmNux/It59wInEfP40gNIYRIA+vqpnNdj5CQpPlIZvlIkZlKFuiPFLl\nNevbH9IoqDz1cQ2SSoEtMwbNZH00OgeuHYFkvGl6j4Zp16nYW8SltAwjthFe\nsRLNXJ2ijDWh8b8RbBMt5Ws5yaufyMuV6cocccJb0O6kFfoPScUvpeFGvUMk\nyqnbf/B4MxVVQ+7WkzdWBztb3D4oKF7n3rYlZSkSqiOav46MKxJ3LQy7Cvxo\nUNpl\r\n=dGlg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSN9rnrp2XGyCUXEf32+GSmwtY26wd+NKeUyVVm220LAIhAPTZHwK2fcvrmppqMl1qBc3czO2jg6BbHupSJ61lQMih"}],"size":12945,"noattachment":false,"key":"/blake2b-wasm/-/blake2b-wasm-2.4.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"},{"name":"emilbayes","email":"github@tixz.dk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/blake2b-wasm_2.4.0_1637580544046_0.5788558649108246"},"_hasShrinkwrap":false,"readme":"# blake2b-wasm\n\nBlake2b implemented in WASM\n\n```\nnpm install blake2b-wasm\n```\n\nWorks in browsers that support WASM and Node.js 8+.\n\n## Usage\n\n``` js\nvar blake2b = require('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#### `hash.getPartialHash()`\n\nReturns the current partial hash.\n\n#### `hash.setPartialHash(data)`\n\nSet the hash to a previously set hash. `data` should be the result of `getPartialHash()` (which returns uint8array)\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. To build the thin Javascript wrapper do:\n\n```\nnpm run compile\n```\n\n## License\n\nMIT\n","publish_time":1637580544222,"_cnpm_publish_time":1637580544222,"dist-tags":{"latest":"2.4.0"}}