{"name":"sha512-wasm","version":"2.1.0","description":"sha512 hashing algorithm implemented in WebAssembly","main":"index.js","scripts":{"test":"node test"},"keywords":["sha512","WASM","WebAssembly"],"repository":{"type":"git","url":"git://github.com/chm-diederichs/sha512-wasm.git"},"author":{"name":"Christophe Diederichs"},"license":"ISC","dependencies":{"nanoassert":"^2.0.0"},"devDependencies":{"js-sha512":"^0.8.0","sha-test":"^1.1.0","tape":"^4.13.0","wat2js":"^2.1.1","wat2wasm":"^3.0.0"},"gitHead":"a884ef90df7c8904008ae43fededc564efcd5911","bugs":{"url":"https://github.com/chm-diederichs/sha512-wasm/issues"},"homepage":"https://github.com/chm-diederichs/sha512-wasm#readme","_id":"sha512-wasm@2.1.0","_nodeVersion":"12.18.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-ztqU8O5mRrHFt1pXuXEnyxmj629IWxxErvAABOr0Itov2B0ejWy5zNhpVubSibrdpNlJtaZEJL2/0Jf1BnkG9g==","shasum":"cb563ad135168ec2740fd5da44c26eaedc320f83","tarball":"http://registry-npm.ywwl.com/sha512-wasm/download/sha512-wasm-2.1.0.tgz","fileCount":6,"unpackedSize":15787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUL51CRA9TVsSAnZWagAAcWYP/3B7iO+lyfs85tzI2eT5\nMO9VhpjagH0yrM7u3Iu+2HwkaQ7v2VY2DDE8uNCoWwXU3RSYUtXAZkuT7QHC\ngtZjDI/XrSf7fjT9nc+SYdp6Hfbaaa7dnaDAk59RvJ29twriS/rpboyahdbW\nJjfNn5baysVopLuUuQEXN1HsvFyQh26Dkf/lxRl/tZELzv+tPUSX9JxYdDci\nlDozz2qN9YuNSUuYoVowDorQDO5snVD8H55thTsi2PZlPOo/WVRpVGzFB9d2\ndmWXyS/CPy5SOkSMO0WtLYgw2URjvzUEfBcM6hpmzFEBbK/TYGXdR4Og6dGy\nr/KgfW+/db0yv4pDqLjEE705Wc8jLISHXZrUDYP/CYs9kqnH3aDRNrUao+M4\nXxmdTbNWrf+Ic/5xkaUN7Kp1naa/1zFmjdgi5FOTSBCEj5ASzrpCQ3mbjN6b\n/8OPwzIqEkxkb+EhEWrUxq+Ii1+vtDR4CnpTxMnoTZinWc1CYWRPcL2oD4uQ\nISozmRDTt736SvCeysJeNV8gAyJnDer7uCntB6h0CgDw5GsHximEEY1ZM2qP\nCR0lRZ1F6mchZSvz76HQZ/dXzd3m8xHLr7983SEZ3hYzcfF+ntf07MfHrc7Q\ny9z/IADL/Wr7sQa4Fhri0c7ZNicLHEl9qGxw3TS4NeHPZXHVXAgRIB4siErH\nbIfg\r\n=tjC8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDiPZFLyW3Vv2LCvfw9N0lf7P4R1FI8+6glPqouXAuAgIgOoBfcyIn2RdvMshW8kvZPQMiT3jdmmb5Oi/uwZ0EHF8="}],"size":7198,"noattachment":false,"key":"/sha512-wasm/-/sha512-wasm-2.1.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/sha512-wasm_2.1.0_1599127157297_0.005958357437219064"},"_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":1599127157392,"_cnpm_publish_time":1599127157392,"dist-tags":{"latest":"2.3.4"}}