{"name":"sha512-wasm","version":"1.0.0","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":{"sha512":"0.0.1"},"_id":"sha512-wasm@1.0.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-0hmVfCoTfP0imK/2sa1ldk+UktyDWRcsePxxbyBw5JvDAv3mEBcOqodbkz+t3h9iN2hBkZyNIUT6Y+7+yNg4ng==","shasum":"5b14671153663fcdb63186055182bbb4facbe3ac","tarball":"http://registry-npm.ywwl.com/sha512-wasm/download/sha512-wasm-1.0.0.tgz","fileCount":7,"unpackedSize":176949,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd3uSrCRA9TVsSAnZWagAAp9IP+QFtT12AyeSQPet8xw+q\nRfI6WaSXgJKj7XZp4hkujIWdHR7bE9YN1SxzlvMHK4wxDfe3EeWvqjm3tjGO\nIORVO4v/LC+W7OnKpySJEGGGks7cbQsDB/jqAToTDOJpe4V43kSGWrZJ35db\ns/+QtRytKvARyYEzt+Z8gIPHgq/wLmFTJ1wY1TPkujwRDpdCo+ANOEg5tCw8\ngyiXC6FCJz+RpZeK9JgAzKgFa3TBiilGFgkKEg7mTF9PdhWXoIY+TugXBW9C\nD973Bz9LdAmhcNY4Z16nQot1H/oSSC4c5IRA5yFTFDAa06CzCpAYz5XwsAFb\n0M894XpJ75Z85SBwGu92WFuvCXMnOeyyVBbiMJ/Aaz0AEppJC8AIMk9sojRy\nwWNPZcGF63ASKentNh/ONq7SXHxHD6mlOvEruzSPB+oMY7ZsjA4pwS0TmrJV\nUvs0qVXXLuyHHO3i++hPUKcGL/EEraZmKCTQCRorckS9uXdJR2DWxkuDmHX8\nZ/7IPUHDnzyHUoXsG4h071o7aePbR+ALL2SghaVP9jwBsx2b7qBmACnk+EGa\nwG+EeH54zrEnoPKw2l8pFJGqA6rQnHRZxIvxYwjq+7c8jvJu/QA4L/prWLCx\nhGz//owk2BFjOFcqoFKZAH8cr8v/cD9kP9hberxzdKGXl9aqIRo9B5libbFB\n7sCh\r\n=q/Pk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGgnw2Q1gxFy2RmqyKdsCsRGHI0gg/2achVo1buJvgqZAiBCrwrqwod7XdL7OQiI801IBSB2HzfpiS65HENcHRQ0DA=="}],"size":15057,"noattachment":false,"key":"/sha512-wasm/-/sha512-wasm-1.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/sha512-wasm_1.0.0_1574888618820_0.3012870149376632"},"_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":1574888619039,"_cnpm_publish_time":1574888619039,"dist-tags":{"latest":"2.3.4"}}