{"_id":"js-md4@0.5.0","nyc":{"exclude":["tests"]},"bugs":{"url":"https://github.com/emn178/js-md4/issues"},"dist":{"shasum":"6c8928bf554c1592780460579da18d718ebeb7ff","tarball":"http://registry-npm.ywwl.com/js-md4/download/js-md4-0.5.0.tgz","fileCount":10,"integrity":"sha512-X/4SKc+CNQiBTXkrH+HixfFBkGBXgCTA+yj6H35+1qS2VBMMy0biRHqHpvOGhZWyYHMeGuaRtPYy7bcTAkeMYQ==","signatures":[{"sig":"MEUCIGHfTy1cnk3k1X9iY6+bsDO7GdvubEiepScjLrnUoscKAiEAk5lv4wwZRpu481NMU/VNZNI+n9ZTvjSVoVGZlR42Hpw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEvV9YpwvjFq9TnypEBShppHHEfyZ79Cw5vUZGO3pHUkAiBMKWZAu9hLHQR4q0OugBlWZ5kmYebzfUfpvYejG3omWg=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/js-md4@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":66471,"size":14380,"noattachment":false,"key":"/js-md4/-/js-md4-0.5.0.tgz"},"main":"src/md4.js","name":"js-md4","types":"./index.d.ts","author":{"name":"Chen, Yi-Cyuan","email":"emn178@gmail.com"},"module":"build/md4.mjs","exports":{".":{"types":"./index.d.ts","import":"./build/md4.mjs","default":"./src/md4.js","require":"./src/md4.js"},"./src/md4.js":"./src/md4.js","./package.json":"./package.json","./build/md4.mjs":"./build/md4.mjs","./build/md4.min.js":"./build/md4.min.js","./build/md4.min.mjs":"./build/md4.min.mjs"},"gitHead":"a69263b3fb9635440b091bd311bdac04a005f9c4","license":"MIT","scripts":{"doc":"rm -rf doc && jsdoc -c jsdoc.json src/md4.js README.md -d doc","test":"npm run build && npm run test:coverage","build":"rollup -c && uglifyjs src/md4.js -c -m --comments -o build/md4.min.js && npm run doc","report":"nyc --reporter=html --reporter=text npm run test:runtime","prepack":"rollup -c && uglifyjs src/md4.js -c -m --comments -o build/md4.min.js","test:runtime":"mocha tests/node-test.js && mocha tests/esm-test.mjs","test:coverage":"nyc --reporter=text --reporter=html --reporter=lcov npm run test:runtime"},"version":"0.5.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"25aab227-ac95-43e9-ae1c-669b8cf5257d"}},"homepage":"https://github.com/emn178/js-md4","keywords":["md4","hash","encryption","cryptography"],"overrides":{"glob":"^14.0.2","minimatch":"^11.0.1"},"repository":{"url":"git+https://github.com/emn178/js-md4.git","type":"git"},"_npmVersion":"11.19.1","description":"A simple MD4 hash function for JavaScript supports UTF-8 encoding.","directories":{},"maintainers":[{"name":"emn178","email":"emn178@gmail.com"}],"_nodeVersion":"24.22.2","_hasShrinkwrap":false,"devDependencies":{"nyc":"^18.0.0","jsdoc":"^4.0.5","mocha":"^12.0.3","rollup":"^4.65.0","expect.js":"~0.3.1","uglify-js":"^3.19.3","@rollup/plugin-terser":"^1.0.2","@rollup/plugin-commonjs":"^29.0.3"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/js-md4_0.5.0_1794980673660_0.16005848112005217"},"readme":"# js-md4\n[![CI](https://github.com/emn178/js-md4/actions/workflows/ci.yml/badge.svg)](https://github.com/emn178/js-md4/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/emn178/js-md4/badge.svg?branch=master)](https://coveralls.io/r/emn178/js-md4?branch=master)\n[![NPM](https://img.shields.io/npm/v/js-md4)](https://www.npmjs.com/package/js-md4)\n[![CDNJS](https://img.shields.io/jsdelivr/npm/hm/js-md4)](https://www.jsdelivr.com/package/npm/js-md4)\n\nA simple MD4 hash function for JavaScript supports UTF-8 encoding.\n\n## Demo\n[MD4 Online](https://emn178.github.io/online-tools/md4.html)  \n\n## Download\n[Compress](https://raw.github.com/emn178/js-md4/master/build/md4.min.js)  \n[Uncompress](https://raw.github.com/emn178/js-md4/master/src/md4.js)\n\n## Installation\nYou can also install js-md4 by using Bower.\n\n    bower install js-md4\n\nFor node.js, you can use this command to install:\n\n    npm install js-md4\n\n## Notice\n`buffer` method is deprecated. This maybe confuse with Buffer in node.js. Please use `arrayBuffer` instead.\n\nMD4 is not available in Node.js `crypto` since Node.js 17 (OpenSSL 3), so js-md4 always uses its JavaScript implementation.\n\n## Usage\nYou could use like this:\n```JavaScript\nmd4('Message to hash');\n\nvar hash = md4.create();\nhash.update('Message to hash');\nhash.hex();\n\nvar hash2 = md4.update('Message to hash');\nhash2.update('Message2 to hash');\nhash2.array();\n```\nIf you use node.js, you should require the module first:\n```JavaScript\nvar md4 = require('js-md4');\n```\nIf you use node.js ESM or a bundler, you can import like this:\n```JavaScript\nimport { md4 } from 'js-md4';\n// or\nimport md4 from 'js-md4';\n```\nIn browsers, you can import the ESM build directly:\n```HTML\n<script type=\"module\">\n  import { md4 } from 'https://cdn.jsdelivr.net/npm/js-md4/build/md4.min.mjs';\n</script>\n```\nIf you use TypeScript, you can import like this:\n```TypeScript\nimport { md4 } from 'js-md4';\n```\nIt supports AMD:\n```JavaScript\nrequire(['your/path/md4.js'], function (md4) {\n// ...\n});\n```\n[See document](https://emn178.github.com/js-md4/doc/)\n\n## Example\n```JavaScript\nmd4(''); // 31d6cfe0d16ae931b73c59d7e0c089c0\nmd4('The quick brown fox jumps over the lazy dog'); // 1bee69a46ba811185c194762abaeae90\nmd4('The quick brown fox jumps over the lazy dog.'); // 2812c6c7136898c51f6f6739ad08750e\n\n// It also supports UTF-8 encoding\nmd4('中文'); // 223088bf7bd45a16436b15360c5fc5a0\n\n// Unpaired surrogates are encoded as U+FFFD, the same as TextEncoder\nmd4('\\ud800'); // 35852b4988e2e8b0e18a4ece221e2ce2\n\n// It also supports byte `Array`, `Uint8Array`, `ArrayBuffer` and other `ArrayBuffer` views (their underlying bytes are hashed)\nmd4([]); // 31d6cfe0d16ae931b73c59d7e0c089c0\nmd4(new Uint8Array([])); // 31d6cfe0d16ae931b73c59d7e0c089c0\n\n// Different output\nmd4(''); // 31d6cfe0d16ae931b73c59d7e0c089c0\nmd4.hex(''); // 31d6cfe0d16ae931b73c59d7e0c089c0\nmd4.array(''); // [49, 214, 207, 224, 209, 106, 233, 49, 183, 60, 89, 215, 224, 192, 137, 192]\nmd4.digest(''); // [49, 214, 207, 224, 209, 106, 233, 49, 183, 60, 89, 215, 224, 192, 137, 192]\nmd4.arrayBuffer(''); // ArrayBuffer\n```\n\n## License\nThe project is released under the [MIT license](http://www.opensource.org/licenses/MIT).\n\n## Contact\nThe project's website is located at https://github.com/emn178/js-md4  \nAuthor: Chen, Yi-Cyuan (emn178@gmail.com)\n","publish_time":1794980673773,"_cnpm_publish_time":1794980673773,"dist-tags":{"latest":"0.5.0"}}