{"name":"sha512-wasm","version":"2.0.0","description":"sha512 hashing algorithm implemented in WebAssembly","main":"index.js","scripts":{"test":"node test","bench":"node test/benchmark.js"},"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","tape":"^4.13.0","wat2js":"^2.1.1","wat2wasm":"^3.0.0"},"gitHead":"eb0576576f905c994594294069b35d77dced348f","bugs":{"url":"https://github.com/chm-diederichs/sha512-wasm/issues"},"homepage":"https://github.com/chm-diederichs/sha512-wasm#readme","_id":"sha512-wasm@2.0.0","_nodeVersion":"12.18.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-FwfC7esq0kMVCDc3Ub45vnCZ3eBNYD8CD0ic4ewTUDEEbYw8EDVBdgQmM3F7aNiQwWfO0d1K9/XR7T9qWYC4SQ==","shasum":"ab6f2f683dcba6346e03d7b8bbd4224b5816adf9","tarball":"http://registry-npm.ywwl.com/sha512-wasm/download/sha512-wasm-2.0.0.tgz","fileCount":9,"unpackedSize":494117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/dh1CRA9TVsSAnZWagAAx0sQAJ8c05qdrBycIbbb9BZj\nbh3F+Hc7wtgfw98TYt+pTV2w4WW2JSpPzc5kdBpi0Dm+ryAo8tjtDSMQtNXa\nUTKu9rT4TTwLcrKuoAkLEsJANBqQZ98BQPQbk9axerBO8GfRHk68YNx7ghVK\n9UXlWGiSF054/mmNx71Uic0EOO3Pl+PXxLnobf4wgcYap3NDbj1r/aAzAx8N\nrspOdMn9aSpXxMZUyJPItWssf0zUS+obKGFHD9GAlAr0LWAeP8O2/hINqCJD\nUVNSmtFIWe3slP7s2Kh18H6WaOCWoHJN9OlIJ3rRSD1g6jxrDzMTga1344tk\nlinECBIHyS9Cc60gVOKe4kt8V9MmUBM59gA6tWxHdyKScHGt6+1v44+D4vrI\nPPNZSNVRQz1wuyqdz2l5qZnC74p+wpUEaRiAZSQvmlJtuXI2Kr7Rm2tFmJxu\n7rJ6s17wzHvHgNugPio062YfFNGb8QJRWqNwFcFrlkdPSYnqDQl2CcKuXEN9\ncQsjXfhkbh5CWGgmBl03pl+uPA2RK2H0s4v9WdBRO/22qf5IbJpy1jWFRWaG\nKU0lygOLSYphKSubaPUwnkpUpsXv2pJlwl1JGZ5rBQhkJKykgZEXm+98da8H\nUHV0qt15LyPyowH3Dfm+5l/fyyLbmkpG4JfbzkVesLN/eAdy8hZDQ4i/m8oY\nQJEI\r\n=foaj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICWdr9ngFwIR2wytBp44TxXdepBngC0SKELmzCPbix/7AiAcv5WzY2KsqLc0eCWRkdRC2nMogB78vb+dLRDUyZIyjw=="}],"size":76909,"noattachment":false,"key":"/sha512-wasm/-/sha512-wasm-2.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_2.0.0_1593694325377_0.875189350123653"},"_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":1593694325476,"_cnpm_publish_time":1593694325476,"dist-tags":{"latest":"2.3.4"}}