{"name":"js-md5","version":"0.10.0","keywords":["md5","hash","encryption","cryptography","HMAC"],"author":{"name":"Chen, Yi-Cyuan","email":"emn178@gmail.com"},"license":"MIT","_id":"js-md5@0.10.0","maintainers":[{"name":"emn178","email":"emn178@gmail.com"}],"homepage":"https://github.com/emn178/js-md5","bugs":{"url":"https://github.com/emn178/js-md5/issues"},"nyc":{"exclude":["tests"]},"dist":{"shasum":"6370196b86e54504edfb53b86db9e0cc9f54219b","tarball":"http://registry-npm.ywwl.com/js-md5/download/js-md5-0.10.0.tgz","fileCount":26,"integrity":"sha512-ty2QGIWsaCGQkw9OKXhrDElDXuAaCtFAkNW/N75NbHoU+ELVQA5FRqyzqrTUr0olOKeoEHuTIYOfu7VssGw+2Q==","signatures":[{"sig":"MEUCIBmok/IJutX7dHXQu+dKwz426A0BIKRREqkad4MlSsrRAiEAyLRq6S87cSnaH7W26zGIXUpugS2i2tjzCtKUw/NxZTI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIClHrDcRfjYIBteSJnCyUStPoNefqSEplqfcbDzSCQE1AiEA+e7h2vfc0b2GaugBwhnzzlN+bjHEhEv4JLyRn+foIjI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/js-md5@0.10.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":348514,"size":49677,"noattachment":false,"key":"/js-md5/-/js-md5-0.10.0.tgz"},"main":"src/md5.js","types":"./index.d.ts","module":"build/md5.mjs","browser":{"buffer":false,"crypto":false},"exports":{".":{"node":{"import":"./build/md5.node.mjs","require":"./src/md5.js"},"types":"./index.d.ts","import":"./build/md5.mjs","default":"./src/md5.js","require":"./src/md5.js"},"./src/md5.js":"./src/md5.js","./build/md5.js":"./build/md5.js","./package.json":"./package.json","./build/md5.mjs":"./build/md5.mjs","./build/md5.min.js":"./build/md5.min.js","./build/md5-lite.js":"./build/md5-lite.js","./build/md5.min.mjs":"./build/md5.min.mjs","./build/md5-lite.mjs":"./build/md5-lite.mjs","./build/md5.node.mjs":"./build/md5.node.mjs","./build/md5.modern.js":"./build/md5.modern.js","./build/md5.modern.mjs":"./build/md5.modern.mjs","./build/md5-lite.min.js":"./build/md5-lite.min.js","./build/md5-lite.min.mjs":"./build/md5-lite.min.mjs","./build/md5-lite.node.mjs":"./build/md5-lite.node.mjs","./build/md5.modern.min.js":"./build/md5.modern.min.js","./build/md5.modern.min.mjs":"./build/md5.modern.min.mjs","./build/md5.modern.node.mjs":"./build/md5.modern.node.mjs"},"gitHead":"2bf0dfe85260e280dc74a7aad3276bd159e86dbc","scripts":{"doc":"rm -rf doc && jsdoc -c jsdoc.json src README.md -d doc","test":"nyc mocha tests/node-test.js && node tests/build-test.js && node tests/esm-test.mjs","build":"rollup -c && npm run doc","report":"nyc --reporter=html --reporter=text mocha tests/node-test.js","coverage":"nyc report --reporter=text-lcov > coverage.lcov"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"bcefbb5d-79d2-4ef2-8c0f-c33c3c6a6448"}},"overrides":{"diff":"^8.0.3","glob":"^14.0.2","minimatch":"^11.0.1","serialize-javascript":"^7.1.3"},"repository":{"url":"git+https://github.com/emn178/js-md5.git","type":"git"},"_npmVersion":"11.19.1","description":"A simple MD5 hash function for JavaScript supports UTF-8 encoding.","directories":{},"_nodeVersion":"24.22.2","_hasShrinkwrap":false,"devDependencies":{"nyc":"^18.0.0","jsdoc":"~4.0.2","mocha":"^11.7.6","rollup":"^4.43.0","expect.js":"~0.3.1","requirejs":"^2.1.22","tiny-worker":"^2.3.0","@rollup/plugin-terser":"^1.0.0","@rollup/plugin-commonjs":"^29.0.3"},"_npmOperationalInternal":{"tmp":"tmp/js-md5_0.10.0_1794819253459_0.7242382500455314","host":"s3://npm-registry-packages-npm-production"},"readme":"# js-md5\n[![CI](https://github.com/emn178/js-md5/actions/workflows/ci.yml/badge.svg)](https://github.com/emn178/js-md5/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/emn178/js-md5/badge.svg?branch=master)](https://coveralls.io/r/emn178/js-md5?branch=master)\n[![NPM](https://img.shields.io/npm/v/js-md5)](https://www.npmjs.com/package/js-md5)\n[![CDNJS](https://img.shields.io/jsdelivr/npm/hm/js-md5)](https://www.jsdelivr.com/package/npm/js-md5)\n\nA simple and fast MD5 hash function for JavaScript supports UTF-8 encoding.\n\n## Demo\n[MD5 Online](http://emn178.github.io/online-tools/md5.html)  \n[MD5 File Checksum Online](http://emn178.github.io/online-tools/md5_checksum.html)\n\n## Download\n- [Compress](https://raw.github.com/emn178/js-md5/master/build/md5.min.js)\n- [Uncompressed build](https://raw.github.com/emn178/js-md5/master/build/md5.js)\n- [Modern](https://raw.github.com/emn178/js-md5/master/build/md5.modern.min.js)\n- [Modern uncompressed](https://raw.github.com/emn178/js-md5/master/build/md5.modern.js)\n- [Lite](https://raw.github.com/emn178/js-md5/master/build/md5-lite.min.js)\n- [Lite uncompressed](https://raw.github.com/emn178/js-md5/master/build/md5-lite.js)\n- [Uncompress](https://raw.github.com/emn178/js-md5/master/src/md5.js)\n\n### Builds\n\n| Build | Legacy fallbacks | Node acceleration | HMAC | Base64 | Deprecated `buffer` |\n| --- | --- | --- | --- | --- | --- |\n| `md5.js` / `md5.min.js` | Yes | Yes | Yes | Yes | Yes |\n| `md5.modern.js` / `md5.modern.min.js` | No | Yes | Yes | Yes | Yes |\n| `md5-lite.js` / `md5-lite.min.js` | No | No | No | No | No |\n\nThe modern and lite builds require `Array.isArray`, `ArrayBuffer`, typed arrays,\nand `ArrayBuffer.isView`. The lite build keeps the one-shot and streaming MD5\nAPIs, including `hex`, `array`, `digest`, and `arrayBuffer` output.\n\n## Benchmark\n- [Benchmark (measurethat.net) - Short String](https://measurethat.net/Benchmarks/Show/29171/0/md5-performance-comparison-v2)\n- [Benchmark (measurethat.net) - Long String](https://measurethat.net/Benchmarks/Show/29172/0/md5-performance-comparison-long-text-v2)\n- [Benchmark (jsperf.app) - Long String](https://jsperf.app/jonuhi/6)\n- [Benchmark (measurethat.net) - Very Long String](https://measurethat.net/Benchmarks/Show/29173/0/md5-performance-comparison-very-long-text)\n- [Benchmark (jsperf.app) - Very Long String](https://jsperf.app/jonuhi/8)\n- [Async Benchmark (measurethat.net)](https://measurethat.net/Benchmarks/Show/29176/0/md5-performance-comparison-very-long-text-v6)\n- [Async Benchmark (jsperf.app)](https://jsperf.app/jonuhi/9)\n\n* js-md5 is the fastest for short strings in these benchmarks. For large data, WebAssembly-based libraries (e.g. Hash-WASM) are faster.\n\n- [File Benchmark - Issue #19](https://github.com/emn178/js-md5/issues/19)\n- [File Benchmark - Issue #42](https://github.com/emn178/js-md5/issues/42)\n\n## Installation\nYou can also install js-md5 by using Bower.\n\n    bower install md5\n\nFor node.js, you can use this command to install:\n\n    npm install js-md5\n\n## Notice\n`buffer` method is deprecated. This maybe confuse with Buffer in node.js. Please use `arrayBuffer` instead.\n\n## Usage\nYou could use like this:\n```JavaScript\nmd5('Message to hash');\nvar hash = md5.create();\nhash.update('Message to hash');\nhash.hex();\n\n// HMAC\nmd5.hmac('key', 'Message to hash');\n\nvar hash = md5.hmac.create('key');\nhash.update('Message to hash');\nhash.hex();\n```\n\n### Node.js\nIf you use node.js, you should require the module first:\n```JavaScript\nvar md5 = require('js-md5');\n```\n\n### TypeScript\nIf you use TypeScript, you can import like this:\n```TypeScript\nimport { md5 } from 'js-md5';\n```\n\n## RequireJS\nIt supports AMD:\n```JavaScript\nrequire(['your/path/md5.js'], function(md5) {\n// ...\n});\n```\n[See document](https://emn178.github.com/js-md5/doc/)\n\n## Example\n```JavaScript\nmd5(''); // d41d8cd98f00b204e9800998ecf8427e\nmd5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6\nmd5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0\n\n// It also supports UTF-8 encoding\nmd5('中文'); // a7bac2239fcdcb3a067903d8077c4a07\n\n// It also supports byte `Array`, `Uint8Array`, `ArrayBuffer` and other `ArrayBuffer` views (their underlying bytes are hashed)\nmd5([]); // d41d8cd98f00b204e9800998ecf8427e\nmd5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e\n\n// Different output\nmd5(''); // d41d8cd98f00b204e9800998ecf8427e\nmd5.hex(''); // d41d8cd98f00b204e9800998ecf8427e\nmd5.array(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126]\nmd5.digest(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126]\nmd5.arrayBuffer(''); // ArrayBuffer\nmd5.base64(''); // 1B2M2Y8AsgTpgAmY7PhCfg==\n\n// HMAC\nmd5.hmac.hex('key', 'Message to hash');\nmd5.hmac.array('key', 'Message to hash');\n// ...\n```\n\n## License\nThe project is released under the [MIT license](https://opensource.org/license/mit/).\n\n## Contact\nThe project's website is located at https://github.com/emn178/js-md5  \nAuthor: Chen, Yi-Cyuan (emn178@gmail.com)\n","publish_time":1794819253561,"_cnpm_publish_time":1794819253561,"dist-tags":{"latest":"0.11.0"}}