{"name":"sha256-wasm","version":"1.2.3","description":"WebAssembly implementation of SHA-256","main":"index.js","scripts":{"test":"node test"},"repository":{"type":"git","url":"git+https://github.com/chm-diederichs/sha256-wasm.git"},"keywords":["WebAssembly","SHA-256"],"author":{"name":"Christophe Diederichs"},"license":"ISC","bugs":{"url":"https://github.com/chm-diederichs/sha256-wasm/issues"},"homepage":"https://github.com/chm-diederichs/sha256-wasm#readme","dependencies":{"nanoassert":"^2.0.0"},"devDependencies":{"js-sha256":"^0.9.0","sodium-native":"^2.4.6","tape":"^4.13.0"},"gitHead":"6f2667267b96c4799eb87b36e0a3598670090dd6","_id":"sha256-wasm@1.2.3","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-9ULDSeBDSk+RxIZt6mPT5xZgSbVGhmircWFv+EN/m5ME/s31NJCKR8NoqHtfV4R2WLKA7MV08pkKS9rCHXnn0Q==","shasum":"a0ee000f71920294fa0a4a7e9fc3535154f62fb6","tarball":"http://registry-npm.ywwl.com/sha256-wasm/download/sha256-wasm-1.2.3.tgz","fileCount":8,"unpackedSize":1061462,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeS/lRCRA9TVsSAnZWagAA8zwP/2RfQgviUQrrNjnfPXkz\n3T6beqAobK/JTZROg3ABYAeRi7YJXLnJyRWEFU2x6tQyoP8D5V88uoD7uNlF\n3vhmMy+MMcJ+XFZPlYRPEWESGm2sndOcVVceZRch1wSurCUpj6+CepruzBN4\n/xCarTwcfcx3VX6X04IWcFfRtYmaGLovrgaXVGoiMoy9Xjei6LEyHoX6ktrx\nYJI0j4UXx/q1JZxUTc2bUFdS87XlqTwwhMK+q1Wg6BiYiX4y4+VEDFY7om15\nC8B+id0Yj9Bwhp5+9GXrh7okyX3zt2ch+XBVnpOaGqEa5qoYwzuj/5i/JSG8\nCoqcEpM6+fNbFhoygZ4dWcuRYc1pBMHhtSmBssyHaocR0Aphi4okC+uPkWSM\nzlpfXm+zCeNh1ywLQvJY9aYmyn4EQQUnDhUAiyHDZwnRu1y4TLvHRdE2wvx5\nI8epz8VG6zhjxK3oxA20uPfw+Eb4EHWOuOHVtLIYSJCweoTq7WeWihs/vefe\noDRVWi1DnRqs2F//wkAl56Hc7j66Ln1lglztCdoPpxkruCM2SX3TqrPEEeuK\nfEpPuFkPhLcMiKpp2wiif8H1WkT/Gpq90uP9XjDaUnpMmw/AJhM1rTqGDLut\nkPVqlM5mgPAZ4h1ky2jpplfaW4e5vS8mqdFdEA2djk3xatmfqMzPLQysLtyD\n3H9d\r\n=4nih\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICNPHHU2J2nRtvZWEv+A2ONhd92hriTlKaeHxVj6v6vCAiBixpvzeXubizITYUdx+2+TYXiD43BR+2q3DyqwzHtw+A=="}],"size":84649,"noattachment":false,"key":"/sha256-wasm/-/sha256-wasm-1.2.3.tgz"},"maintainers":[{"name":"chm-diederichs","email":"christophe.diederichs@googlemail.com"}],"_npmUser":{"name":"chm-diederichs","email":"christophe.diederichs@googlemail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sha256-wasm_1.2.3_1582037328676_0.828635509353917"},"_hasShrinkwrap":false,"readme":"# sha256-wasm\n## Usage\n```js\nconst sha256 = require('sha256-wasm')\n\nif (!Sha256.SUPPORTED) {\n  console.log('WebAssembly not supported by your runtime')\n}\n\nvar hash = sha256()\n  .update('hello')\n  .update(' ')\n  .update(Buffer.from('world'))\n  .digest('hex')\n\nconsole.log('Sha256 hash of \"hello world\" is ', hash)\n// b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9\n```\n\n## API\n#### `const hash = sha256()`\n\nCreate a new hash instance.\n\n#### `hash.update(data, [enc])`\n\nUpdate the hash with a new piece of data. `data` may be passed as a buffer, uint8array or a string. If `data` is passed as a string, then it will be interpreted as a `utf8` string unless `enc` specifies an encoding.\n\nSupported `enc`s are:\n- `utf8` / `utf-8` (defualt)\n- `hex`\n- `base64`\n\n#### `hash.digest([enc])`\n\nDigest the hash. If `enc` is specified, then the digest shall be returned as an `enc` encoded string. Otherwise a buffer is returned.\n\nSupported `enc`s are:\n- `utf8` / `utf-8` (defualt)\n- `hex`\n- `base64`\n\n#### `var promise = sha256.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## Contributing\n\nThe bulk of this module is implemented in WebAssembly in the [sha256.wat](sha256.wat) file. To build the thin Javascript wrapper do:\n\n```\nnpm run compile\n```\n\n## License\n\nMIT\n","publish_time":1582037328832,"_cnpm_publish_time":1582037328832,"dist-tags":{"latest":"2.2.2"}}