{"name":"sha512-wasm","version":"2.3.4","description":"sha512 hashing algorithm implemented in WebAssembly","main":"index.js","scripts":{"test":"node test","compile":"wasm-to-js -sf cjs sha512.wat > sha512.js"},"keywords":["sha512","WASM","WebAssembly"],"repository":{"type":"git","url":"git://github.com/chm-diederichs/sha512-wasm.git"},"author":{"name":"Christophe Diederichs"},"license":"ISC","dependencies":{"b4a":"^1.0.1","nanoassert":"^2.0.0"},"devDependencies":{"js-sha512":"^0.8.0","sha-test":"^1.1.0","tape":"^4.13.0","wasm-tools":"^0.2.0"},"gitHead":"c16f9301aa1a64196c478964d3fdc4a7bc00cc78","bugs":{"url":"https://github.com/chm-diederichs/sha512-wasm/issues"},"homepage":"https://github.com/chm-diederichs/sha512-wasm#readme","_id":"sha512-wasm@2.3.4","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-akWoxJPGCB3aZCrZ+fm6VIFhJ/p8idBv7AWGFng/CZIrQo51oQNsvDbTSRXWAzIiZJvpy16oIDiCCPqTe21sKg==","shasum":"b86b37112ff6d1fc3740f2484a6855f17a6e1300","tarball":"http://registry-npm.ywwl.com/sha512-wasm/download/sha512-wasm-2.3.4.tgz","fileCount":6,"unpackedSize":14246,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPDzPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo1Zw/+LYgSnGLzFewJuZF6rFcKgQzTJco90lw3rMBdgPHTroQEQD8w\r\n/ErPVlSw/MDBOqclLURuJrVDu1zn4widyYJwQFxh4yWSQvgjJUFrypP/DgJQ\r\nBSZHDGLw4qS0lj1Bf4TJyTs6jGYupZA+90gxrkXEq0BdOVOyQk1jnkqVOnJj\r\nsH9t8KQAAXlUjisSMCogqGb0wfrEO8mwwGKpDPd0AEhx2hy8eFAAPdeg+Swq\r\n0qRzQYz8I9gowyLEhbiFEUV61heR+AnPtbENh+6MQP+afbhkye5mf0fYyYMe\r\nAnin92BANlDFt3LxTZ5cevRuqogQVvHCKL0vxGC46AMQzbZbafLctVvpG3Pf\r\nlaZf3ERBMdcHchzOSeNlRqhiJT8J/Fvxv63lYInQzfk7OLvMrXHbGpVJgGcy\r\n5qcFQyESy4sYXyGRW40punxt6opLhYaEXJYHyx0oWUxgGuURiDVYMn1V7SZC\r\ncvkR2pw7wecyTe2CKzZkppelykZWFZrOfG8Nmwo168k5epiXmRJ9ztUoJs2U\r\nB6YRVQCABXeE4nKrkgQ9D4Q/bfTdnasEVqspcxsYabZMFOUnK/OZlmhQNKQ1\r\ngyXtLV6c07Xz6haZLHrfpEUneGHvcDxY55kKvAVM+Ky1FsTE69ok8JurGotd\r\n4AOugNCtlUVc9/3zMfU1EpgM6nqXzuClGX8=\r\n=xzQt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHsAKet3o1tnet4yalYUcZqZFvhU+UeKDTpahvfYPOGJAiEA8nc14UgVX06OKTpgJUs4PI5B8qTvjDTLq6YAWjtlyP4="}],"size":6795,"noattachment":false,"key":"/sha512-wasm/-/sha512-wasm-2.3.4.tgz"},"_npmUser":{"name":"chm-diederichs","email":"christophe.diederichs@googlemail.com"},"directories":{},"maintainers":[{"name":"chm-diederichs","email":"christophe.diederichs@googlemail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sha512-wasm_2.3.4_1648114895690_0.22538212212520325"},"_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":1648114895883,"_cnpm_publish_time":1648114895883,"dist-tags":{"latest":"2.3.4"}}