{"name":"blake2b-wasm","version":"2.1.0","description":"Blake2b implemented in WASM","main":"index.js","dependencies":{"nanoassert":"^1.0.0"},"devDependencies":{"blake2b":"^1.2.0","browserify":"^14.4.0","tape":"^4.6.3","wat2js":"^1.1.1","wat2wasm":"^1.0.2"},"scripts":{"compile":"wat2js blake2b.wat -o 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":"23bee06945806309977af802bc374727542617c7","_id":"blake2b-wasm@2.1.0","_npmVersion":"6.0.0","_nodeVersion":"11.14.0","_npmUser":{"name":"emilbayes","email":"github@tixz.dk"},"dist":{"integrity":"sha512-8zKXt9nk4cUCBU2jaUcSYcPA+UESwWOmb9Gsi8J35BifVb+tjVmbDhZbvmVmZEk6xZN1y35RNW6VqOwb0mkqsg==","shasum":"aa90ed687b8a92e1c01d1643db86bcf21caa2ab7","tarball":"http://registry-npm.ywwl.com/blake2b-wasm/download/blake2b-wasm-2.1.0.tgz","fileCount":12,"unpackedSize":133950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdbrEBCRA9TVsSAnZWagAAtaMP+wew+ykwHbJiBZcPtqJt\n+pdBIdFTUklgdr62xh/ZiRMZNH52unXodZ1LFsftiya9ccFv4hvujKorGttt\nNa71KswOKmubt9CoqLkCSMO1Nq1OBghoGoasxLglZes4dXEpPpfPrREJBJKx\nHMtayYwtTvDIVKcXiF5aHqiY0be1TMlGzU/V+BcVJYeiY2CRx+Hfld60qsRw\nBBpHwunx5wQs3G5ou5OMb/CJzx/epRC1kmVBX2fY6f3Dckj959wv25YsRt2J\nEtxEdaL8usit2OGii2YLZ+9XKR/0xhau5+KzZa6ykhCfRYIElmX376vdM9Yu\nJo8kM71yTTpGSv+GaSWjlsVxc46ItQmyBeKa3dSEFz/2D0+2rCxlWXk3McGe\nCVN9a3NN+ufKNbr8CZSYonX8BfYnFq40BEJ54dtBzcS9H+UIKnx5J/US9xkf\n3tiJe4Q1kVgtTdO0FiK06nj1ng7cjfkvpyzYaoo+RDn2Epk1nk/Xkw7X+gwZ\nEU3CJMIDT1OHP9V+vZW2gTkVh8i0v1HYOrgoqI5Hz6BLPhAQnrFiLV/kQ0Yg\nNRTn83aj0UciCO26K4KxSpATZMX+5EoY/sZpM8xqXAZW3HrHqvweTeFOuPAS\nG8ZytpASbJU2VEzdhUY2/HVd9fRjJOwg3tD5h3aI3/ZwmosDNMhwy+2GWT/j\novNu\r\n=np6i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcCroSQv7t3PqxxoyAayngBDmxhF3rL63MeoDj/UTfjwIgWSf8HGXCU6GxAwMAaMo+6Yckpp4f804T0TqvU5B5eik="}],"size":14920,"noattachment":false,"key":"/blake2b-wasm/-/blake2b-wasm-2.1.0.tgz"},"maintainers":[{"email":"github@tixz.dk","name":"emilbayes"},{"email":"mathiasbuus@gmail.com","name":"mafintosh"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/blake2b-wasm_2.1.0_1567535360902_0.2521520123641279"},"_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":1567535361049,"_cnpm_publish_time":1567535361049,"dist-tags":{"latest":"2.4.0"}}