{"name":"sha256-wasm","version":"0.0.0","description":"WebAssembly implementation of SHA-256","main":"index.js","scripts":{"test":"node test.js"},"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":{"js-sha256":"^0.9.0"},"devDependencies":{},"gitHead":"d587ef4f03a9f40e4f70fec98370e64a076c0096","_id":"sha256-wasm@0.0.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-U+aYgtHvenzN2F8mGB19JRT7R2EwmBBy7YOkYRxiCODrXgYnh3+LDDU4cHR9rC9nGuAPwItLsgVJD4+pMOyA/g==","shasum":"86566806d9566d3010825e14db7a3d67982a900f","tarball":"http://registry-npm.ywwl.com/sha256-wasm/download/sha256-wasm-0.0.0.tgz","fileCount":14,"unpackedSize":533578,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3O8ECRA9TVsSAnZWagAAUwoP/i/wQVxkExmr4MjZeYbx\n7M+54mgRlmrRjti2lHC2MRJAJBS9fdKjwyWXMsR33e1pC7NTj1ieygQg/Zc7\nWTLwTxebgvAAFpfbjlwQwiMAZz6hoJ0pvPaSukbPL+YgWCCXc4Q7Y66GBCDK\nN/6PKDiglfEHrutgDcanKpP2Adms7Qdc+O7vXuFz8dyE+kdNcGnx060La6tY\nbwcuIeN2b8ZDboJ1cNeHqoShNnRPXy7hHbjFqY+rjBINGybn/m2Czw4vPXYl\np4Rrp7APydLhZoRznWCf578fUcLyE+fYAhbojQ9Qw+OcX/P5yapdds5gtSFN\nHOOkEHESoHQW0NwMjDrhW0dWTj+ogaqNzGW3YZf8hp2n7/rWJnjWUyKshlle\nfhLx6KOhLuNIxEmdRbYxhGqCdpEA+9oksPBVXEl3UlDeDYoPZEZFldH6Iwe1\nqToqRPhosth0jU66Q6k8mJ0SH+yGg3b+9xMgS3YQsf1jB1+llvzcIkrJYB1P\nARv2Ox6csf76luJyJ2SlWo3yi63yo9aWfDGe8CbhZSjxZnM1YoYbB7EiqXWp\nb4sc7pENXklRz44PxBnPzCMxdptcH3r2kjAs+BjL+UYQtECzgxoxKeYPcCYi\nRSQ5gt8WjrvMI94Y2HR6XeioikO2fUxOefalwgooTZnm8dM02ivQ/yBM4tNI\nckYj\r\n=ViHB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEvvOUOcUvTCGJ+HyzS/YcaiEkVHT5WF/PeWMO/t6E6yAiEA9xHQtRTkjyDFSghOo4GpHF7UPHNkXsu0aDtnbspQiF4="}],"size":219854,"noattachment":false,"key":"/sha256-wasm/-/sha256-wasm-0.0.0.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_0.0.0_1574760195898_0.36803735567059936"},"_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":1574760196131,"_cnpm_publish_time":1574760196131,"dist-tags":{"latest":"2.2.2"}}