{"name":"sha512-wasm","version":"1.1.0","description":"sha512 hashing algorithm implemented in WebAssembly","main":"index.js","scripts":{"test":"node test"},"keywords":["sha512","WASM","WebAssembly"],"author":{"name":"Christophe Diederichs"},"license":"ISC","dependencies":{"nanoassert":"^2.0.0"},"devDependencies":{"js-sha512":"^0.8.0","tape":"^4.13.0"},"gitHead":"4d55aab4f551393f1d69bdd5db775166b8a5ba92","_id":"sha512-wasm@1.1.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-11LRYVFjWdStAWA9fUzl9nOobe/ckIMzHs8Yih3AqPCpS2bvC1Sw2Tet06aA6Xq8xL7ugf/UQrn5cpjjD3Fqrw==","shasum":"32a00dc66968d6a0f7d93f367886df4d46ea500e","tarball":"http://registry-npm.ywwl.com/sha512-wasm/download/sha512-wasm-1.1.0.tgz","fileCount":8,"unpackedSize":1235898,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeS/kiCRA9TVsSAnZWagAAqa4P/RteZdJuxWLFIqiL12//\nOus7dLLzsoN5qfmrxpGvaEGBmTpb8fC9yEHnp+tFDYqB9CG86bHiyOgWR8B9\nd7EOJ0HvMrpgJxNRHPI8RYFHIvMLQ38fVE7ohcfdbCgAWuWrlYOTW4fX0noS\nX2QQBkR6rUTe9BPIxDXfFiVI85KRc2Uv1+o+2DgXaqZB7iDV+3Z08dcpbbfF\n+EuhtHOw9DLEIBBvq4Iu/HfdHmR2OqoDmJznb5+09gL9M1vRQTylBhdRZUot\nbVYzXrQGmNrGaEcHY7ZYnLd2Qgrk5q/hlfPA3QQYs89ZHrNrtPS6g6BkvZfY\ngE5LAhMUsknlxxC5F1xHDZacL3QJ0uql0USFVbV4lHmHK2GYtgxkw0R0gZgZ\nQLdpxuxaEWy17gSxGVM0geIaW5Dy2qnADGBGftEet5zfcmYZ81PT/1D1d9w8\nEV8RUZBAATmU7zF96xKAvyHirVryTZEfSpO9u/RtzkzEZhieIGFcN5oN6sSJ\nLnWCqQfyeezD5jg2XSHJVBxRheOzUodI/FIzoSlNROcfa8+1gZBxWHqJp2Wv\ndbJ50kW1UkW1ADZ8qE3K9gA+kMH7MHVAtoj14AEF+YmzuPO+9wlvuMgfHk1p\nYP/mk894PYYC0HLnfj2VYBzqZHYyqhgSRbawDDpW8sM4bigojEzPZAqroxQ9\n3j1V\r\n=x+yr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwjwBD3WdY+90LhZuM7w+o4Gv4qjz9/AoZqKNGXu0r+AIhAKSjqdXUSeZ5Re8AtvT/AZae2KpD9PEeJWhcPHMnKJfm"}],"size":101936,"noattachment":false,"key":"/sha512-wasm/-/sha512-wasm-1.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_1.1.0_1582037281432_0.9519457895145116"},"_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":1582037281601,"_cnpm_publish_time":1582037281601,"dist-tags":{"latest":"2.3.4"}}