{"_id":"file-to-sha512","_rev":"1-387091806d68c0f60169b4f9026ec882","name":"file-to-sha512","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"file-to-sha512","version":"0.0.1","description":"Calculates a SHA-512 of a given file. Single package for the browser and node.","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git@github.com:dimitarnestorov/file-to-hash.git"},"homepage":"https://github.com/dimitarnestorov/file-to-hash/tree/master/packages/file-to-sha512","author":{"name":"Dimitar Nestorov","email":"opensource@dimitarnestorov.com"},"license":"MIT","keywords":["sha512","blob","file","path","data","string","buffer","checksum","hash","hex","base64","crypto"],"scripts":{"prepublishOnly":"yarn run build","build":"rimraf dist && tsc","watch":"rimraf dist && tsc -w"},"dependencies":{"blob-to-sha512":"^0.0.1","data-to-sha512":"^0.0.1","path-to-sha512":"^0.0.1"},"_id":"file-to-sha512@0.0.1","dist":{"shasum":"a47cf5e594faa3a9eb8f59892b92f633298f55d5","integrity":"sha512-3PpQGUl2IoSZ/SsOQxzm43VsyODrnj4YKDsIhSKNJkyQrXOqN/S9A+pahOPG61qDXbPnw+9pV3wtYR+VQs1HQg==","tarball":"https://registry.npmjs.org/file-to-sha512/-/file-to-sha512-0.0.1.tgz","fileCount":6,"unpackedSize":2991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcJpz8CRA9TVsSAnZWagAAS+cP/2xFylDbF4Hdbd/yYcFy\na3EcQdhx8BuCcapJgng6G/wBMOJSOMyI8UY/i/MOteh/sh26w1MPEXmEhuhC\n1Swa837hCn4Jumj0SZPPv69IZOslqeMAmBjFjDr67+fX93/ZFfbkYFpko0ae\nK4og2DaIvVyhsSgthzlcbOKkCIl3hSLlu9sNIiI9C4VDxti/H3ZWkr35v+tf\nsGXbLPLb1xmZoACePKppWsTYoSBXzoCjI6Pg1y0NqqryB68ynjLcD1qarbnp\nzbju9JT3SynoOHRpJduuNGF9FuBHHzlj1ywm9gQSfa7MPX4V8yupMrevp8Eq\nGSMFk/h/CaDQLwOhk+Ai9ra5d/Zz6vYwAW/v6Z+9BnO3cqIOYDNO0SQHWQfr\nXjMHe9IG7vECOkuM+a2x5Ku84ETZbTCTV4Y8GIHsnYMCwHfOU9VJV/oHhU2U\nV3pT8eBiCpyztaPhEMJF/5xv/4/GNrUAuxxbFZt2DIBX0EYRmHc8BuoARoQ+\nD2Tl/+rfzQXsJxTtIs/MOzSFwNptBM95I5T17oZlQd1SjRZy7lwTTs8K2mzx\nz1LW1lhQZjC3P38S7UMkQVOigci5M8ULXbqsMPD3rE+rInIlXLRt3ArrL8j0\nMErnMZ8WQs3K8i+VHOjKkH5vUP5L2FI40l/Z0vcbSC3gXrVwiZSv2Q7L44CB\n5G4b\r\n=o84Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVzVQDm4ixjZ2AVxSXXF9hg+0eHEoKs5q8DpBRcFdbEQIgeKZ+NDo5wP6BHKtw2B01M0ChHHmMe8N/XkhBR6Op4lE="}]},"maintainers":[{"name":"dimitarnestorov","email":"opensource@dimitarnestorov.com"}],"_npmUser":{"name":"dimitarnestorov","email":"opensource@dimitarnestorov.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/file-to-sha512_0.0.1_1546034428013_0.32854232227430913"},"_hasShrinkwrap":false}},"time":{"created":"2018-12-28T22:00:27.838Z","0.0.1":"2018-12-28T22:00:28.165Z","modified":"2022-05-02T09:37:17.285Z"},"maintainers":[{"name":"dimitarnestorov","email":"opensource@dimitarnestorov.com"}],"description":"Calculates a SHA-512 of a given file. Single package for the browser and node.","homepage":"https://github.com/dimitarnestorov/file-to-hash/tree/master/packages/file-to-sha512","keywords":["sha512","blob","file","path","data","string","buffer","checksum","hash","hex","base64","crypto"],"repository":{"type":"git","url":"git@github.com:dimitarnestorov/file-to-hash.git"},"author":{"name":"Dimitar Nestorov","email":"opensource@dimitarnestorov.com"},"license":"MIT","readme":"# file-to-sha512\n\n> Calculates a SHA-512 of a given file\n\n## Install\n\nUsing yarn:\n```sh\nyarn add file-to-sha512\n```\n\nor using npm:\n```sh\nnpm install file-to-sha512\n```\n\n## Usage in the browser\n```javascript\nimport { blobToSHA512 } from 'file-to-sha512'\n\nconst hash = await blobToSHA512(fileInput.files[0])\n```\n\n## Usage in node\n\n### For file paths\n```javascript\nconst { pathToSHA512 } = require('file-to-sha512')\n\nconst hash = await pathToSHA512('/path/to/file')\n```\n\n### For buffers or strings\n```javascript\nconst fs = require('fs')\nconst { dataToSHA512 } = require('file-to-sha512')\n\nconst buffer = fs.readFileSync('/path/to/file')\n\nconst hash = dataToSHA512(buffer)\n```\n","readmeFilename":"README.md"}