{"name":"sha512-wasm","version":"1.0.3","description":"sha512 hashing algorithm implemented in WebAssembly","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["sha512","WASM","WebAssembly"],"author":{"name":"Christophe Diederichs"},"license":"ISC","dependencies":{"nanoassert":"^2.0.0"},"devDependencies":{"js-sha512":"^0.8.0"},"gitHead":"e3da39566be852c5bc12f62373f0f55dee7863b3","_id":"sha512-wasm@1.0.3","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-ToTHGfV3tHUHh0A4gV4RK3vAIgGMstGEU0I7dCJ+1CXbGhXthusHM4E8CdgDVKD43WwVOyb1DT2+snsEY9qvug==","shasum":"f1b6e2fd7bcb795038c3364905fb1eeb31a08bd3","tarball":"http://registry-npm.ywwl.com/sha512-wasm/download/sha512-wasm-1.0.3.tgz","fileCount":8,"unpackedSize":1235760,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeSoWiCRA9TVsSAnZWagAAk/0P/jTnaHxt8DLNtnJeb43J\npLXOMjBT4n2+ihBUxJGayrSDIwQgjeFyW3uLLec2RHJvlWHjY7ITvD+HoLt7\nfWo+AYlcgc81mDPuV1uA+R64v0mcZDMMfyVf26Rcxd6dr9uONQHGLk4+Zky5\nIQo5eBPo4kfbqIBg4zW7Ncw+JnxpxSgPiyx7HZQ8PaTtSCwEbzWjSn5svvQH\nUggM6m37t26KS7naaJR8jxsgf27GR6Xil30cuoPOq1hC3xFAJXJyIgBMxtHW\nLj5y5csqBZSH0yIU7iL9Q35aFdShbzIaLCk76hOLGNOhgywEvoCxBcSFXCuO\nTSIglSjdUqdnBBDXXrbSoZtAjTBLwGrtpeVKKM5fSyGdUTR0eQnteyaNEEy4\nNJ+iVFBjW6TdVah+QRBysxFQG0yyrOB+kvGvBZqVRZjP2qAtk24L+KjM0GHt\nt/YSqsoqSFsM6fMZ6hJcvBy0IicGVn89Q9lEIsds4K08mGQtkcnYMsMoAjzs\njtajGwpm/VlKoDrwTltXu6WJSELwBtxMZyaMBOoEGSDaA2GDed4ixLELwLy4\nAfJrmxyP1sq6vooQopI4FP6f6QkggEUTStz23JFyviUiJhG1Hvc9Y/rwQPqT\nOMbae+pvM4BLM8vD6lQ70f5uWq0v3QLxDeV8clJrprJpKWWvS+tAVvN5+qJR\nc8Od\r\n=hBqb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICKRT4YxD0K1qJiYWFCfJNHRbpGupYdaMtAv2f5UgohpAiEAlGGLaroB+c+YkPDT0QbTVmzfL9UwIli/l/HNS0JuDHw="}],"size":101914,"noattachment":false,"key":"/sha512-wasm/-/sha512-wasm-1.0.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/sha512-wasm_1.0.3_1581942177207_0.062466933877787456"},"_hasShrinkwrap":false,"readme":"# sha512-wasm\n## Usage\n```js\nconst sha512 = require('sha512-wasm')\n\nif (!Sha512.SUPPORTED) {\n  console.log('WebAssembly not supported by your runtime')\n}\n\nvar hash = sha512()\n  .update('hello')\n  .update(' ')\n  .update(Buffer.from('world'))\n  .digest('hex')\n\nconsole.log('Sha512 hash of \"hello world\" is ', hash)\n// 309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f\n```\n\n## API\n#### `const hash = sha512()`\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 = sha512.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 [sha512.wat](sha512.wat) file. To build the thin Javascript wrapper do:\n\n ```\n npm run compile\n ```\n\n## License\n\nMIT\n","publish_time":1581942178453,"_cnpm_publish_time":1581942178453,"dist-tags":{"latest":"2.3.4"}}