{"_id":"@1-/md5","_rev":"5-3b76c647c792c940e8507af812928e66","name":"@1-/md5","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@1-/md5","version":"0.1.0","keywords":[],"author":{"name":"x-at-01@googlegroups.com"},"license":"MulanPSL-2.0","_id":"@1-/md5@0.1.0","maintainers":[{"name":"i18n-now","email":"i18n.site@gmail.com"}],"homepage":"https://github.com/webc-site/npm/tree/main/md5","bugs":{"url":"https://github.com/webc-site/npm/issues"},"dist":{"shasum":"a8cd68da3f7899549b5943f411c241116d4ef3f1","tarball":"https://registry.npmjs.org/@1-/md5/-/md5-0.1.0.tgz","fileCount":4,"integrity":"sha512-rAEdJVVNe9xgAc/S4C0don5Ev+MtJITUGu34tphe1eQ/yrtJpnestr2T3jQs/bnXkq/wHQuU8laYtB9W0PkPZA==","signatures":[{"sig":"MEUCIQCOottB9WMgHHmo33rySLAniDts25LSN+3oXHBFVWGmZQIgLsEjN7maxOPosfzG4Xhh64xTtDezfKmYjh2eI3n2pSM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3435},"type":"module","exports":{"./*":"./*"},"_npmUser":{"name":"i18n-now","email":"i18n.site@gmail.com"},"repository":{"url":"git+https://github.com/webc-site/npm.git","type":"git"},"_npmVersion":"11.16.0","description":"[English](#en) | [中文](#zh)","directories":{},"_nodeVersion":"26.2.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/md5_0.1.0_1781153126825_0.801092678444794","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@1-/md5","version":"0.1.1","keywords":["md5","hash","checksum","file-integrity","streaming"],"author":{"name":"x-at-01@googlegroups.com"},"license":"MulanPSL-2.0","_id":"@1-/md5@0.1.1","maintainers":[{"name":"i18n-now","email":"i18n.site@gmail.com"}],"homepage":"https://github.com/webc-site/npm/tree/main/md5","bugs":{"url":"https://github.com/webc-site/npm/issues"},"dist":{"shasum":"7826a238aadd71e35a4bd3d4a63dc6e2c759904f","tarball":"https://registry.npmjs.org/@1-/md5/-/md5-0.1.1.tgz","fileCount":4,"integrity":"sha512-g5fQkFCzuvFTIK3PRGjD1MFi3ytsX8DZ7DEFPJVFjAwhbCVs8vC4df75JT5ufW5Nhdv+wrdEzrZuuGAU4s+dzA==","signatures":[{"sig":"MEYCIQCxK3Ve4ttDx8doBOvvX1h/Ny4ToRs08m46hLuVdpbXHQIhAIAZsHq4ZPwy6I+q84w/hKeHszIoNYfVeu+iM3LgFZ+T","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4809},"type":"module","exports":{"./*":"./*"},"_npmUser":{"name":"i18n-now","email":"i18n.site@gmail.com"},"repository":{"url":"git+https://github.com/webc-site/npm.git","type":"git"},"_npmVersion":"11.16.0","description":"Calculate file MD5 hashes efficiently","directories":{},"_nodeVersion":"26.2.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/md5_0.1.1_1781154123626_0.9234626292591228","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@1-/md5","version":"0.1.2","keywords":["checksum","file-integrity","hash","md5","streaming"],"author":{"name":"x-at-01@googlegroups.com"},"license":"MulanPSL-2.0","_id":"@1-/md5@0.1.2","maintainers":[{"name":"i18n-now","email":"i18n.site@gmail.com"}],"homepage":"https://github.com/webc-site/npm/tree/main/md5","bugs":{"url":"https://github.com/webc-site/npm/issues"},"dist":{"shasum":"5f50fd3ffc66f4109bd6a3ec8577a3ce16d523ae","tarball":"https://registry.npmjs.org/@1-/md5/-/md5-0.1.2.tgz","fileCount":8,"integrity":"sha512-4DbrVKPRI3E4/EMbqZU9XxJ3XhywCBHAn4YXTBgEQXRX0thfTrIB5unRQIqrf1ulQvMG57puR3/78D9dZJSSLA==","signatures":[{"sig":"MEQCIARJCU53Su7McJP2sOwe+eSf8V4rrgYAwnHrO7HETEDTAiArFbdwRECpe+ICGCgalM3hagLYovTvi3r5jG2+ae0OsQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6742},"type":"module","exports":{"./*":"./*"},"_npmUser":{"name":"i18n-now","email":"i18n.site@gmail.com"},"repository":{"url":"git+https://github.com/webc-site/npm.git","type":"git"},"_npmVersion":"11.16.0","description":"Calculate file MD5 hashes efficiently","directories":{},"_nodeVersion":"26.2.0","dependencies":{"@1-/fmt":"^0.1.1","@3-/ext":"^0.0.2","@1-/read":"^0.1.1","@3-/utf8":"^0.1.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/md5_0.1.2_1781587874672_0.7264550293877763","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@1-/md5","version":"0.1.3","keywords":["checksum","file-integrity","hash","md5","streaming"],"author":{"name":"x-at-01@googlegroups.com"},"license":"MulanPSL-2.0","_id":"@1-/md5@0.1.3","maintainers":[{"name":"i18n-now","email":"i18n.site@gmail.com"}],"homepage":"https://github.com/webc-site/npm/tree/main/md5","bugs":{"url":"https://github.com/webc-site/npm/issues"},"dist":{"shasum":"dbb278c091105e46aef68600aec1570445935bac","tarball":"https://registry.npmjs.org/@1-/md5/-/md5-0.1.3.tgz","fileCount":8,"integrity":"sha512-foGn0Phqcv06n3C4sXRzioBYF0uTUqhrBtscli5AgvoLw34Og2EkjsgkFej5O4ZyL4YF7qJEPhf9MLsYQE6EeA==","signatures":[{"sig":"MEUCIFHd7jDcWHAxVKFCrFqC38/E7AhYDMdurCS6iikvbQc5AiEA1Y0rJjQzTd5w4b99EjHYrjb6KwA4vn4qkobiOaL3MAw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6742},"type":"module","exports":{"./*":"./*"},"_npmUser":{"name":"i18n-now","email":"i18n.site@gmail.com"},"repository":{"url":"git+https://github.com/webc-site/npm.git","type":"git"},"_npmVersion":"11.16.0","description":"Calculate file MD5 hashes efficiently","directories":{},"_nodeVersion":"26.2.0","dependencies":{"@1-/fmt":"^0.1.0","@3-/ext":"^0.0.2","@1-/read":"^0.1.1","@3-/utf8":"^0.1.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/md5_0.1.3_1781588024442_0.34502653061793165","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@1-/md5","version":"0.1.4","description":"Calculate file MD5 hashes efficiently","keywords":["checksum","file-integrity","hash","md5","streaming"],"homepage":"https://github.com/webc-site/npm/tree/main/md5","license":"MulanPSL-2.0","author":{"name":"x-at-01@googlegroups.com"},"repository":{"type":"git","url":"git+https://github.com/webc-site/npm.git"},"type":"module","exports":{"./*":"./*"},"dependencies":{"@1-/fmt":"^0.1.1","@1-/read":"^0.1.1","@3-/ext":"^0.0.2","@3-/utf8":"^0.1.1"},"_id":"@1-/md5@0.1.4","bugs":{"url":"https://github.com/webc-site/npm/issues"},"_nodeVersion":"26.2.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-hBnFE/9LShISNKQ4sWyZywD1qKPcb/bVy0GX1BTS0CLX7RQf8rHxklegKut6xzSxYBtGCGmA0Lj61MVFNDlN8Q==","shasum":"4eee4689e823a7f49327f408c2d9655c609e3588","tarball":"https://registry.npmjs.org/@1-/md5/-/md5-0.1.4.tgz","fileCount":8,"unpackedSize":6930,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDkQp+Imxmh1CNm8wQMZ6fA+xpXEsYQIo7wg53RE9Ew8QIgNYg6hv4Gtd5BWqssfO/7VHgYJ3T6F+xT3WNwJTY/Bt4="}]},"_npmUser":{"name":"i18n-now","email":"i18n.site@gmail.com"},"directories":{},"maintainers":[{"name":"i18n-now","email":"i18n.site@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/md5_0.1.4_1781611801130_0.8443176532976924"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-11T04:45:26.598Z","modified":"2026-06-16T12:10:01.425Z","0.1.0":"2026-06-11T04:45:26.996Z","0.1.1":"2026-06-11T05:02:03.811Z","0.1.2":"2026-06-16T05:31:14.812Z","0.1.3":"2026-06-16T05:33:44.597Z","0.1.4":"2026-06-16T12:10:01.267Z"},"bugs":{"url":"https://github.com/webc-site/npm/issues"},"author":{"name":"x-at-01@googlegroups.com"},"license":"MulanPSL-2.0","homepage":"https://github.com/webc-site/npm/tree/main/md5","keywords":["checksum","file-integrity","hash","md5","streaming"],"repository":{"type":"git","url":"git+https://github.com/webc-site/npm.git"},"description":"Calculate file MD5 hashes efficiently","maintainers":[{"name":"i18n-now","email":"i18n.site@gmail.com"}],"readme":"[English](#en) | [中文](#zh)\n\n---\n\n<a id=\"en\"></a>\n# @1-/md5 : Efficiently compute MD5 hashes for files and text\n\n- [@1-/md5 : Efficiently compute MD5 hashes for files and text](#1-md5-efficiently-compute-md5-hashes-for-files-and-text)\n  - [Functionality](#functionality)\n  - [Usage demonstration](#usage-demonstration)\n    - [1. Calculate file MD5](#1-calculate-file-md5)\n    - [2. Format and calculate text MD5](#2-format-and-calculate-text-md5)\n  - [Design rationale](#design-rationale)\n  - [Technology stack](#technology-stack)\n  - [Code structure](#code-structure)\n  - [Historical context](#historical-context)\n  - [About](#about)\n\n## Functionality\n\nCompute MD5 hash values for files or raw text strings.\n\n- Stream-based calculation avoids loading entire files into memory\n- Returns binary hash as `Buffer`\n- For text files (`md`, `txt`, `yml`, `toml`, `yaml`, `html`): reads with `@1-/read`, formats with `@1-/fmt`, encodes with `@3-/utf8/utf8e.js`, then computes MD5\n- Handles large files without memory pressure\n- Uses Node.js built-in `crypto` module\n\n## Usage demonstration\n\n```bash\nnpm install @1-/md5\n```\n\n### 1. Calculate file MD5\n\n```javascript\nimport pathMd5 from \"@1-/md5/pathMd5.js\";\n\nconst hash = await pathMd5(\"/path/to/file.txt\");\nconsole.log(hash); // Buffer (MD5 binary)\n```\n\n### 2. Format and calculate text MD5\n\n```javascript\nimport fmtMd5 from \"@1-/md5/fmtMd5.js\";\n\nconst hash = await fmtMd5(\" hello world \\r\\n\");\nconsole.log(hash); // Buffer (MD5 binary)\n```\n\n## Design rationale\n\n![](https://fastly.jsdelivr.net/gh/webc-fs/-@Sl/e9z3qwk_g8-iV7VpNCnw.svg)\n\n## Technology stack\n\n- Node.js built-in `fs` and `crypto` modules\n- ES modules syntax\n- Dependencies: `@1-/read`, `@1-/fmt`, `@3-/ext`, `@3-/utf8`\n\n## Code structure\n\n- `src/pathMd5.js`: Main entry point, selects processing path based on file extension\n- `src/fmtMd5.js`: Format text and compute its MD5\n- `src/fpMd5.js`: Stream-based MD5 calculation for arbitrary files\n- `test/_.test.js`: Test suite\n- `readme/en/README.md`: English documentation\n- `readme/zh/README.md`: Chinese documentation\n\n## Historical context\n\nThe MD5 algorithm was designed by Ronald Rivest in 1991 to replace MD4 and specified in RFC 1321 in 1992. Though cryptographically broken for collision resistance since 2004, MD5 remains suitable for non-security-critical applications such as checksum verification, data partitioning, and file integrity checking. This library implements streaming chunked processing to handle large files efficiently.\n\n## About\n\nThis library is developed by [WebC.site](https://webc.site).\n\n[WebC.site](https://webc.site): A new paradigm of web development for AI\n\n\n---\n\n<a id=\"zh\"></a>\n# @1-/md5 : 高效计算文件与文本 MD5 哈希值\n\n- [@1-/md5 : 高效计算文件与文本 MD5 哈希值](#1-md5-高效计算文件与文本-md5-哈希值)\n  - [功能介绍](#功能介绍)\n  - [使用演示](#使用演示)\n    - [1. 计算文件 MD5](#1-计算文件-md5)\n    - [2. 格式化并计算文本 MD5](#2-格式化并计算文本-md5)\n  - [设计思路](#设计思路)\n  - [技术栈](#技术栈)\n  - [代码结构](#代码结构)\n  - [历史故事](#历史故事)\n  - [关于](#关于)\n\n## 功能介绍\n\n计算文件或文本字符串的 MD5 哈希值。\n\n- 流式计算避免将整个文件加载到内存\n- 返回二进制哈希值 `Buffer`\n- 对文本文件（`md`, `txt`, `yml`, `toml`, `yaml`, `html`）：使用 `@1-/read` 读取，`@1-/fmt` 格式化，`@3-/utf8/utf8e.js` 编码后计算 MD5\n- 处理大文件无内存压力\n- 使用 Node.js 内置 `crypto` 模块\n\n## 使用演示\n\n```bash\nnpm install @1-/md5\n```\n\n### 1. 计算文件 MD5\n\n```javascript\nimport pathMd5 from \"@1-/md5/pathMd5.js\";\n\nconst hash = await pathMd5(\"/path/to/file.txt\");\nconsole.log(hash); // Buffer (MD5 二进制)\n```\n\n### 2. 格式化并计算文本 MD5\n\n```javascript\nimport fmtMd5 from \"@1-/md5/fmtMd5.js\";\n\nconst hash = await fmtMd5(\" hello world \\r\\n\");\nconsole.log(hash); // Buffer (MD5 二进制)\n```\n\n## 设计思路\n\n![](https://fastly.jsdelivr.net/gh/webc-fs/-@A0/MogqwXEx7ELJNxYqNNbw.svg)\n\n## 技术栈\n\n- Node.js 内置 `fs` 和 `crypto` 模块\n- ES 模块语法\n- 依赖：`@1-/read`, `@1-/fmt`, `@3-/ext`, `@3-/utf8`\n\n## 代码结构\n\n- `src/pathMd5.js`: 主入口，根据文件后缀选择处理路径\n- `src/fmtMd5.js`: 格式化文本并计算其 MD5\n- `src/fpMd5.js`: 流式计算任意文件的 MD5\n- `test/_.test.js`: 测试套件\n- `readme/en/README.md`: 英文文档\n- `readme/zh/README.md`: 中文文档\n\n## 历史故事\n\nMD5 算法由 Ronald Rivest 于 1991 年设计，用于替代 MD4，并于 1992 年在 RFC 1321 中正式发布。尽管自 2004 年起已证实其碰撞抵抗性被攻破，MD5 仍适用于非密码学场景，例如校验和验证、数据分区与文件完整性检查。本库采用流式分块处理方式，高效支持大文件计算。\n\n## 关于\n\n本库由 [WebC.site](https://webc.site) 开发。\n\n[WebC.site](https://webc.site) : 面向人工智能的网站开发新范式\n\n","readmeFilename":"README.md"}