{"library":"md5.js","title":"MD5 Hashing Utility","description":"The `md5.js` package provides an MD5 hashing algorithm implementation written purely in JavaScript, designed to be compatible with Node.js's `crypto` module style. As of its current stable version 1.3.5, it offers a straightforward API for computing MD5 hashes from strings or streams. While it facilitates MD5 computation, it's crucial for developers to acknowledge that the MD5 algorithm is cryptographically compromised, particularly regarding its collision resistance, as highlighted by NIST SP 800-131A. This vulnerability makes it unsuitable for security-sensitive applications such as digital signatures, password hashing, or any scenario where collision resistance is paramount. The package is part of the broader `crypto-browserify` project, which aims to provide Node.js-compatible cryptographic primitives for browser environments, often through polyfills. It maintains a stable, rather than rapid, release cadence, reflecting its mature and foundational utility, despite the inherent cryptographic weaknesses of MD5 itself. Its key differentiator is its pure JavaScript nature, making it universally deployable without native dependencies.","language":"javascript","status":"maintenance","last_verified":"Sun Apr 19","install":{"commands":["npm install md5.js"],"cli":null},"imports":["const MD5 = require('md5.js')","new MD5().update('your data').digest('hex')","const md5Stream = new MD5(); md5Stream.end('data'); const hash = md5Stream.read().toString('hex');"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const MD5 = require('md5.js');\n\n// Compute MD5 hash of a string\nconst inputString = 'hello world';\nconst hash1 = new MD5().update(inputString).digest('hex');\nconsole.log(`MD5 of '${inputString}': ${hash1}`);\n// Expected: 5d41402abc4b2a76b9719d911017c592\n\n// Compute MD5 hash using stream-like interface\nconst md5Stream = new MD5();\nmd5Stream.write('some ');\nmd5Stream.write('more ');\nmd5Stream.end('data'); // Signal end of input\nconst hash2 = md5Stream.read().toString('hex');\nconsole.log(`MD5 of 'some more data': ${hash2}`);\n// Expected: e6b4d32e5b7c4d519b7d0187a55c26b8\n","lang":"javascript","description":"Demonstrates both synchronous string hashing and asynchronous, stream-like processing to compute MD5 hashes, outputting them in hexadecimal format.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}