{"_id":"@altrepo/hash","name":"@altrepo/hash","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@altrepo/hash","version":"0.1.0","description":"A lightweight multi-environment utility library for generating hashes and verifying checksums for text, bytes, and files.","exports":{".":"./dist/shared.js","./node":"./dist/node.js","./browser":"./dist/browser.js"},"typesVersions":{"*":{"node":["dist/node.d.ts"],"browser":["dist/browser.d.ts"],"*":["dist/shared.d.ts"]}},"scripts":{"build":"tsc","test":"vitest run","prepublishOnly":"npm run build"},"keywords":["hash","checksum","sha256","sha512","sha3","blake2","browser","node","webcrypto","altrepo"],"homepage":"https://altrepo.net/hash/text-hash-generator.html","repository":{"type":"git","url":"git+https://github.com/alterpoYT/altrepo-hash.git"},"bugs":{"url":"https://github.com/alterpoYT/altrepo-hash/issues"},"author":{"name":"AltRepo","email":"void@altrepo.net"},"license":"MIT","devDependencies":{"@types/node":"^20.0.0","jsdom":"^29.1.1","typescript":"^5.0.0","vitest":"^1.0.0"},"engines":{"node":">=18.0.0"},"_id":"@altrepo/hash@0.1.0","_nodeVersion":"24.11.1","_npmVersion":"11.14.1","dist":{"integrity":"sha512-tRXdMWCxOp3iDESTVIA/hImccMc1iwAvwSQJaUalVwdoWn5UIVqn5kApHTOtO871fQ3lSgsz3IoEi5Fn+5qiyA==","shasum":"2deb28f5805075b72d478ff525b18326a6ce2a8e","tarball":"https://registry.npmjs.org/@altrepo/hash/-/hash-0.1.0.tgz","fileCount":15,"unpackedSize":15112,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAkuHk0RUBaQB9Ddd+/UeNrkTUA5hnPKCgMcnLhK04IOAiA9zsa7VokIfSxQc+fqZncfDm+Qy4ALZOITBU3SG+imcg=="}]},"_npmUser":{"name":"altrepo","email":"void@altrepo.net"},"directories":{},"maintainers":[{"name":"altrepo","email":"void@altrepo.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hash_0.1.0_1781391958731_0.6051327959489374"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-13T23:05:58.454Z","0.1.0":"2026-06-13T23:05:58.874Z","modified":"2026-06-13T23:05:59.181Z"},"maintainers":[{"name":"altrepo","email":"void@altrepo.net"}],"description":"A lightweight multi-environment utility library for generating hashes and verifying checksums for text, bytes, and files.","homepage":"https://altrepo.net/hash/text-hash-generator.html","keywords":["hash","checksum","sha256","sha512","sha3","blake2","browser","node","webcrypto","altrepo"],"repository":{"type":"git","url":"git+https://github.com/alterpoYT/altrepo-hash.git"},"author":{"name":"AltRepo","email":"void@altrepo.net"},"bugs":{"url":"https://github.com/alterpoYT/altrepo-hash/issues"},"license":"MIT","readme":"# altrepo-hash\n\nAltRepo Hash is a lightweight Node.js utility library for generating hashes and verifying checksums for text, bytes, and files.\n\n## Features\n\n- **Straightforward API:** Easily generate hashes or verify checksums with a clean, intuitive interface.\n- **Zero Dependencies:** Built entirely on top of Node.js's standard `crypto` and `fs` modules, ensuring a lightweight footprint with no external requirements.\n- **Secure Verifications:** Utilizes constant-time comparisons (`crypto.timingSafeEqual`) to securely verify file and text hashes.\n- **Broad Algorithm Support:** Includes built-in support for all major hashing algorithms including `sha256`, `sha512`, `blake2b512`, `blake2s256`, `md5`, `sha1`, and more.\n- **Memory Efficient:** Safely processes large files in chunks via `hashFile` without loading the entire file into memory using standard readable streams.\n\n## Installation\n\n```bash\nnpm install altrepo-hash\n```\n\n## Example API\n\n```typescript\nimport { hashText, hashFile, verifyFileHash } from \"altrepo-hash\";\n\nasync function run() {\n  console.log(hashText(\"hello\", \"sha256\"));\n\n  console.log(await hashFile(\"download.zip\", \"sha256\"));\n\n  console.log(\n    await verifyFileHash(\"download.zip\", \"abc123...\", \"sha256\")\n  );\n}\n\nrun();\n```\n\n## Browser Version\n\nAltRepo Hash is the JS companion to the browser-based hash tools on AltRepo.\n\nMore hash tools:\nhttps://altrepo.net/hash/\n","readmeFilename":"README.md","_rev":"1-d1c829cec5cfc310aae887c497753628"}