{"name":"sha512-wasm","version":"1.0.1","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","sodium-native":"^2.4.6"},"gitHead":"319e695161ad11f239dba117918ce2d9226ffd75","_id":"sha512-wasm@1.0.1","_nodeVersion":"13.6.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-8OP5AHKN85T5D0WtLA50FncRCqA7d5kbdMKsLnUHhV5zrb4/2iuO2/qnmIzfJ8+2zTsoBcyLc0TI1wf9UkMo+w==","shasum":"ce0bcb16de498d4b40af8709605eb935466eec98","tarball":"http://registry-npm.ywwl.com/sha512-wasm/download/sha512-wasm-1.0.1.tgz","fileCount":6,"unpackedSize":799141,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHdZlCRA9TVsSAnZWagAARXUQAKMzJCTx1YlfPj11m/Kx\n1nUNPunCzhXjynpRUG+k77UuQQrLFESgPdERs1Akf4l6yr2pdTvPDmAOZD1L\nkeNd8/tzf+UG1TIwYJVS8C/e0IHF9CmOYjSWsjEjfKeECACfRHUvcAQIiIVN\n40i3MNXuMZUhEUJllHvfYiek/MLDSEeJ/AzB9JoLEdpW9XmyLVMtcjF/Hmjs\nRii67Z148KtRK4LA4fT7xPSik2/B/f5FANG5XuaPsU/v2HRZN1YP5iK7sQUi\n5kmPW1JbVE6ab1Woc6wCVj6PUWJivSDsSwcbPvyhRuqVDFvks6Cdtho2VCNF\n/V6PlgahxM07GXCdV66DyaRa+e94bbINKSYmP6Jq/phRT4CsW9bsgib4nvhv\npIg7HovLF2xecOM17wl07wd+OAH1L8oylayMNwtqfxqoXduJnTHrGcIImCn/\nNqogBw9cC/uICGJwTO7tLm+ve90egTpE1cweYaX8XvSajKFH40/DZZQfJJVk\n0pRy0Te4QEasgA4/+diQZFOnHtIGwqgAKWsRQ66xsMZ0GKGJeVNyPkxV3xwG\nOO9fBxkr5DASGO1oLjlcgZrjctctndFvULWAwv1RvKSuFb6C2PLHuYuDjj5W\n0055zUIaFrQvSVO8MfIN9hXyXKjoNntm1nh8tCUHkk64FmzYmRPJUc/duHNE\nzYpg\r\n=v/f7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCX3HnEBl8xsAzy6ukBa/xWfFAZAdh8vPkVTYMzJuTaQIhAO2sJUew8Q376ofl2vomAuJlsVvb+QsT7YBYcTtapBeu"}],"size":36089,"noattachment":false,"key":"/sha512-wasm/-/sha512-wasm-1.0.1.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.1_1579013733184_0.5774315736600493"},"_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":1579013733320,"_cnpm_publish_time":1579013733320,"dist-tags":{"latest":"2.3.4"}}