{"name":"js-md4","version":"0.4.0","keywords":["md4","hash","encryption","cryptography"],"author":{"name":"Chen, Yi-Cyuan","email":"emn178@gmail.com"},"license":"MIT","_id":"js-md4@0.4.0","maintainers":[{"name":"emn178","email":"emn178@gmail.com"}],"homepage":"https://github.com/emn178/js-md4","bugs":{"url":"https://github.com/emn178/js-md4/issues"},"nyc":{"exclude":["tests"]},"dist":{"shasum":"ecbb34000a575e8324f2a20623b8facbb6aac7de","tarball":"http://registry-npm.ywwl.com/js-md4/download/js-md4-0.4.0.tgz","fileCount":10,"integrity":"sha512-9tnAu+olhlVA8SPmXZz7RhcHz4CjWZbEXZOUDMPGU0+xbJrehJTfmCxdbdOz5nP9DcUbRpbtzKcVGw9k91T/yg==","signatures":[{"sig":"MEUCIQCnz4DSIJsCqznUdgQUWijorLePbbu7aBdqsZw5d6KMYgIgWi3viwYe4nvP76ZE0XoZ9S3AyvTMkMBixqfxyk8zCQQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQD7Z0H3CJzP2bw+NaZklrWP/XMBg/thCswjF7YIFl6rOAIhANS5nNDLi+rvlw1ll4xUuwLHUZJ7gZNV5+Dkc1QkBAgp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/js-md4@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":65610,"size":14139,"noattachment":false,"key":"/js-md4/-/js-md4-0.4.0.tgz"},"main":"src/md4.js","types":"./index.d.ts","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":"b0fcc822c6ac1ce792d99a62d07e614085ad9ffa","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"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"25aab227-ac95-43e9-ae1c-669b8cf5257d"}},"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":{},"_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":{"tmp":"tmp/js-md4_0.4.0_1794901187937_0.2058558997605917","host":"s3://npm-registry-packages-npm-production"},"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":1794901188060,"_cnpm_publish_time":1794901188060,"dist-tags":{"latest":"0.5.0"}}