{"name":"sha512-wasm","version":"1.0.4","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":"d424de5e3996902b3000090f7fc4902a9bd50525","_id":"sha512-wasm@1.0.4","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-7zThxwkzi4KjinRpFb2/k0u+84NQbIE9r4/DMGZDhRhHqrWcr3BN3snJ5/AfYLkzu8tCe0ZHpS5Om+KYcilEow==","shasum":"27fef9f76296289f0c4909f01952d240f38ffa00","tarball":"http://registry-npm.ywwl.com/sha512-wasm/download/sha512-wasm-1.0.4.tgz","fileCount":8,"unpackedSize":1235761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeSoduCRA9TVsSAnZWagAAouMP/j7WpIbVN4yDqBKySGKU\nuGPM9NyHsEULA/0Yevb0UrK4kNrLDMwu3/YTH/nMLWGQUEEaRiLb5lOpYehc\nkHKRromlU66MJvxxJF41jbm1T8k9Rw/sOvF1iCK050OxwnQQ2Lx8q42x5yRJ\nomMVqdw7U6q5X0EDsO4Gkiml/+zgXkReE7Rye0N/hncWlWHrbluEjPO8s8Yr\nf4Pv1dzIZzRalZFfj+66PvwlcCL3tba7Np6/fCbSYeRjWkqWZ7szyfKQ8Sph\nJX1bdN0Vbw03vZYBwwwrzaSAL+fVodQXZDDzCoZH/TSiM3OnwRTy3mxYtmzY\nab9xmwLHcDgYkJDp3L03kRd6Up+yAchmnJ7xhaYTTUMVWtjw8NDO88CRBo2m\nM/X0mTLWm+SXtHinRppT0SqlQn+wd8xdmnexN0WZZV0dz/pUQGvWrAlRGHZl\nz/MHi0/YhnUSGc3vAAaYjDiFrTdbSvtFX26yKkvW6CRKQkZcmNKPJDpr/YgW\nGBJH7Rm+KODzhhSwIxZVFwkc8sEqORWzBSbLFRE+AlZhULkUSoVZa7HoGil+\ngkuP0oimj0nLMPw6nw7FKfNkKpI5Zciq8aVjJ5COgFn/8gVKQDX/DTwlqnSD\nKVjfjHZ7RN5hoCPUixY/2dv5Eis7ErgRa3Zl1a/RGHWXca1nCcLarKq1j/4D\nHvEE\r\n=Gfx1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDL1cPPJsmmnrPjL/ww+hXxtDaWmciFf46BL/7dGPR13wIgftZO6aTPVHRlvSvpBnY7Xlkbkp8CVKISfME3RqfLf38="}],"size":101915,"noattachment":false,"key":"/sha512-wasm/-/sha512-wasm-1.0.4.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.4_1581942637248_0.19379451418044824"},"_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":1581942637410,"_cnpm_publish_time":1581942637410,"dist-tags":{"latest":"2.3.4"}}