{"id":19834607,"url":"https://github.com/emn178/js-md5","last_synced_at":"2025-05-13T19:03:01.694Z","repository":{"id":12945590,"uuid":"15623598","full_name":"emn178/js-md5","owner":"emn178","description":"A simple MD5 hash function for JavaScript supports UTF-8 encoding.","archived":false,"fork":false,"pushed_at":"2025-02-19T17:28:10.000Z","size":587,"stargazers_count":815,"open_issues_count":6,"forks_count":427,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-05-05T04:05:34.425Z","etag":null,"topics":["javascript","md5"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emn178.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-01-04T01:04:27.000Z","updated_at":"2025-04-23T03:55:48.000Z","dependencies_parsed_at":"2022-07-14T04:20:31.166Z","dependency_job_id":"325132b9-69b5-46fb-a1d7-059d17c9c357","html_url":"https://github.com/emn178/js-md5","commit_stats":{"total_commits":42,"total_committers":2,"mean_commits":21.0,"dds":0.04761904761904767,"last_synced_commit":"0263ab835f4847351a710f98488203108c0e1e90"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emn178%2Fjs-md5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emn178%2Fjs-md5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emn178%2Fjs-md5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emn178%2Fjs-md5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emn178","download_url":"https://codeload.github.com/emn178/js-md5/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010792,"owners_count":21998993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","md5"],"created_at":"2024-11-12T12:05:14.025Z","updated_at":"2025-05-13T19:03:01.674Z","avatar_url":"https://github.com/emn178.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# js-md5\n[![Build Status](https://travis-ci.org/emn178/js-md5.svg?branch=master)](https://travis-ci.org/emn178/js-md5)\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://nodei.co/npm/js-md5.png?stars\u0026downloads)](https://nodei.co/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[Uncompress](https://raw.github.com/emn178/js-md5/master/src/md5.js)\n\n## Benchmark\n[jsPerf Benchmark](https://jsperf.app/jonuhi)  \n[File Benchmark](https://github.com/emn178/js-md5/issues/19)\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`\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.buffer(''); // ArrayBuffer, deprecated, This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femn178%2Fjs-md5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femn178%2Fjs-md5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femn178%2Fjs-md5/lists"}