{"name":"blake2b-wasm","version":"2.2.0","description":"Blake2b implemented in WASM","main":"index.js","dependencies":{"nanoassert":"^2.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":"d6854f8b6471f734d9df4489825a9c25c7de4dc7","_id":"blake2b-wasm@2.2.0","_nodeVersion":"16.1.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-4glb1GiM8MHb1mGxV+9/9LB6fqurVVF4VV14w4GKocvGmwdTjDzEwqZRxk9u4CPmHLUOpfPLNtJRH3CDATt4HA==","shasum":"84914f09fb259556a3c35ba78d36b8907df87b8f","tarball":"http://registry-npm.ywwl.com/blake2b-wasm/download/blake2b-wasm-2.2.0.tgz","fileCount":12,"unpackedSize":133950,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrKmRCRA9TVsSAnZWagAAXNMP/iipZdCoyJw/cwji9DPU\nOmgE5hAC+R58H0poxTYr+j8ZfmQiwQLXUwrYfrJiW0skXjkTvSyLbmq0qrUr\nDDANa/2wsk5PI6/TYS705cbpruTmSwE0X9ITKm7arXpiLo3FUXQ1iS+XNF0X\nmm5KqMEq3sq9bOwY0+p/mZnH9QBWIH4OJb2c5+wBqBQwXR4k78DLDHcNXIMv\nKhxiRlTeowFR7ox3CLPsKuykjIHTc/jRBbxDGq3I9DQnRGY3JfzB8D8tOsT7\nShdd3QaB9Ua1/ze83K33/MOgp1WrnlaB2dk6NoahUAlIzLMNV8Ka7cYqZzRV\nIR3HclR9yx5of4EyAE6X4vWtBiqCo5uFoOSPeXTjevRWafxp4cl3/Qj2j3s4\n7h4alWvm/s9J8L83MQg9kwlE7wg9CQFFAkO844svVEgDg2Xajx7NVJR7FLs2\n6ZaRox+V/Z4zPAyAjNd6lraFgAeZGMn0nQ1a9Z8Eo0WK140rdvdRZSQJmZ8R\nmI9XB1UL5rUuEvTTvfNe/KzQnowviRsMncv4oBaoiq7QvUtLSwo/zS9Zi7Rm\n13zdmV+OtufutdimHI1vgU6J+AS77NVA1FCqC3J8Xyml1GQjGZ4vc5JT7lxh\ntkmVpxRAHE/M2JkuhWpjYKmMVd8OlEzofnDPB6aXFw8vAahCX4q28Dga6WZ0\nhQh8\r\n=NgLu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYd0Yht4RxzhEuZXZy7mhUZjLYTCCrHL9GOL3RtObWuAIhANA4SQP6151yH2wLrOO/bvDqpqdzP/x/fCI7KCRmCyic"}],"size":14733,"noattachment":false,"key":"/blake2b-wasm/-/blake2b-wasm-2.2.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.2.0_1621928337257_0.27703815617118965"},"_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":1621928337384,"_cnpm_publish_time":1621928337384,"dist-tags":{"latest":"2.4.0"}}