{"name":"sha512-wasm","version":"1.0.2","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":"facb3403170f585e51dbb783720679ba6eae97be","_id":"sha512-wasm@1.0.2","_nodeVersion":"13.6.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-fILpIBUol6/Ffw/hVUsBU6XlMMKXP/c0YAzBTL0mmlVDyhRcKkiorJcxEjnJ5t3MKk2ifdTWXvCT76nEqayalA==","shasum":"cb5443e878f0a8013a2879a405f7d17bb014401e","tarball":"http://registry-npm.ywwl.com/sha512-wasm/download/sha512-wasm-1.0.2.tgz","fileCount":7,"unpackedSize":1233017,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIv98CRA9TVsSAnZWagAAZ5EP/1sCToR1sqBJ5fb/R/mP\nt5dawPm6p1tfhD2mX4oCoJvfxiLAe4JiJoDFCcBwhCTc76q+ij9qwze1MZXb\nGgn+sIv7N5+neEi9z/SyiI1yVDzNrLWafmIYl7XxiIR6CYdC9nxlMEdkjJhV\n1xkekeF+9SLT8KmYVyYWB58NAUFEiamxndAUNJHNupPRRzL0ZtLC+c6DFfvq\nhVMj95vrCCuK3HFWoXfAcWJcJP2rRZKVK3bBtDgtL9LZXvuBNcc85jCi52J8\n6lZr9ypwY3PDGeYfEJ1FzybnFHF18ycwScmfe6trU0FGsowSy/QnqED+L0+V\nV+vFedPcO4n6YeaYWlY7DHbtRdsbbkwyxDvQ7YE6JnB3kSayiIz8qH/LY9UE\niDZsJEdd8RJq00haiO3BdG/r8/kTNfVv70kygjEAFjJXr2mnPss7rl4QX36p\n+pGTtV0/+MNIr66o2Ub19XicEDaWniQ0aix2ABslaxNJNf3ksFT01QO+Fs4M\nUd+gJzBlhtGa82CBYKosCVRjhsnZKgDweem1Y6GdZbtVegDxMYg7z5oRIfDv\nQ5yuQuER9OSid40aWWWpTzunwEianw6xaNOR+No2hNI6iyaQp24XNEXCTq2J\nUWRF0xDrR2REr5oiVVENCfriKDX6ziepxJ4iIH4XmVwQV24TsyyJOAtenL7b\ncIca\r\n=uFBl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcTrXWgM0i3BxYW5A+uMb4ff+4rKodkDKJT69CcF/9vQIhAKp6rMNbSiDUIFNZ3XVb8uphJeyqXRROXQi5TtQKgGsT"}],"size":99395,"noattachment":false,"key":"/sha512-wasm/-/sha512-wasm-1.0.2.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.2_1579351931573_0.672573490898684"},"_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":1579351931720,"_cnpm_publish_time":1579351931720,"dist-tags":{"latest":"2.3.4"}}