{"name":"blake2b-wasm","version":"0.0.0","description":"Blake2b implemented in WASM","main":"index.js","dependencies":{"brfs":"^1.4.3"},"devDependencies":{"browserify":"^14.4.0"},"browserify":{"transform":["brfs"]},"scripts":{"compile":"wast2wasm blake2b.wat -o blake2b.wasm","demo":"browserify example.js > bundle.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":"771a3f767d6591f80d51557203d34971f8233ac4","_id":"blake2b-wasm@0.0.0","_shasum":"f5935dd3eba9b11a27b6de18eb12eddb65610e77","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"f5935dd3eba9b11a27b6de18eb12eddb65610e77","tarball":"http://registry-npm.ywwl.com/blake2b-wasm/download/blake2b-wasm-0.0.0.tgz","integrity":"sha512-nQ1lMDNoA4SmCEy58DoYRRHDFovBKIRQyNsAg7UKczXkWzXgceWTYMRZpBfdPwSPVvBLnHQXBgn6RRZqKpJ8/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDy/yb1zVmMGI//WpO6NDhrHWhHe6i+K9u6qt5oCsKkawIgO2maFbdE/czhoy0kDZrwAaR5Hon6u0gCvkjbyFAPuC4="}],"size":10409,"noattachment":false,"key":"/blake2b-wasm/-/blake2b-wasm-0.0.0.tgz"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/blake2b-wasm-0.0.0.tgz_1496937583450_0.7197382322046906"},"directories":{},"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":1496937584384,"_cnpm_publish_time":1496937584384,"dist-tags":{"latest":"2.4.0"}}