{"name":"sha512-wasm","version":"2.0.3","description":"sha512 hashing algorithm implemented in WebAssembly","main":"index.js","scripts":{"test":"node test"},"keywords":["sha512","WASM","WebAssembly"],"repository":{"type":"git","url":"git://github.com/chm-diederichs/sha512-wasm.git"},"author":{"name":"Christophe Diederichs"},"license":"ISC","dependencies":{"nanoassert":"^2.0.0"},"devDependencies":{"js-sha512":"^0.8.0","sha-test":"^1.0.0","tape":"^4.13.0","wat2js":"^2.1.1","wat2wasm":"^3.0.0"},"gitHead":"769ec441b7fb9b2052c09b8e9d215fea34c48596","bugs":{"url":"https://github.com/chm-diederichs/sha512-wasm/issues"},"homepage":"https://github.com/chm-diederichs/sha512-wasm#readme","_id":"sha512-wasm@2.0.3","_nodeVersion":"12.18.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-kJQn1sadEDUvK5/mmqwQMFst8fcGOuBDYSLQL5dwXXwTMGK9KYEGrVgv+6nDlwfUWEIUiW3xa9H8nunN6tBDEw==","shasum":"c299c82d3f0434bf47a71defcc5894560444b9d7","tarball":"http://registry-npm.ywwl.com/sha512-wasm/download/sha512-wasm-2.0.3.tgz","fileCount":7,"unpackedSize":55565,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/fFaCRA9TVsSAnZWagAA+M0P/1OZQgxmDiKOWjRwr8nu\n37NflRFLS/K9xdSYx02MDsqjiKsjc892SMLTQTm8og8BSX0DRp2nXYGpgFsi\nSBPbc+H6NNV/7lrUNulfDHWAlfnOuBnNndm4k/1zO0vSFFk5q9X6azeoP7vP\n6XsMzw3/CZX1i4Q5DCcSJXvTjARhZj/kxx+qrr9+8xn+n4YYxMSoeNwr40fQ\n36PRX5RigHgEB+p7VIBu7FpZPejjuR0EBxqA1+JAXr1TSvwxLYvcYA9hcUTm\nTRTNLOxR1y28F2Rn4OutG6Vhw9+7cq3lU0TQAZ61zB/gzGPyAcpswnpzTgx9\nd/F8hsgFLnTTNTcc++czNI2Tl3pHrzzk9TAfv3vy+P+8C3bRG7uOd/LkpGzD\n89WX95Y1ikDrlajPWMaBB8XnneYXKJEdRMUsBRE8UFLIxAP99IMpvFRvJI0W\nqhWp41BKd7COEZGnPsrPPJ7wDDIJKD5orkriHbraFVN26W1PTgxUUrsTKKnE\nkdFyP1LSVKmEr/rGeAJYv94N4Q93n0Lgb9IlZQNIlfcY3Ch6XTbJnaJT69/d\nCsHIS/IRxV7r8hxHJWQOtou8lBcrJxbVGCx6sy4gooT8Bp4P0QcZvPKQla87\nTEtJOrkSZHjkI6+S7c47R0If94O45svCxHOMQMRgTsOot8TEGjle2ZL36v5u\nfzZk\r\n=Sk/c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8INm6MN1DG86M18BNeY++1+rZ/i9rB04Odjvr8COZggIhALeAcBF9LLdlM1A0yQBmb4JdW5x6V7EdH2iGPubhXUTc"}],"size":12080,"noattachment":false,"key":"/sha512-wasm/-/sha512-wasm-2.0.3.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_2.0.3_1593700697985_0.8844526230468552"},"_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":1593700698108,"_cnpm_publish_time":1593700698108,"dist-tags":{"latest":"2.3.4"}}