Registry / auth-security / node-md6

node-md6

JSON →
library0.1.0jsnpmunverified

node-md6 is an implementation of the MD6 cryptographic hash function, a design by Ronald Rivest that was submitted as a candidate for the NIST SHA-3 competition in 2008. MD6 was designed with features like high parallelism through a Merkle tree-like structure and variable output lengths up to 512 bits, aiming for enhanced security and resistance to collision attacks compared to predecessors like MD5. However, it did not advance in the SHA-3 competition due to concerns regarding speed and initially a 'gap in the proof' for differential attack resistance. This specific `node-md6` package is currently at version 0.1.0 and has not seen updates since 2014, making it an unmaintained project. While MD6 itself was designed with strong security principles, using this particular package for new projects is not recommended due to its abandonment and the availability of more widely vetted and maintained hashing algorithms like SHA-256 or SHA-3.

npm install node-md6
INSTALL
IMPORT
SIG · NODE-MD6
N
node-md6
auth-securityjavascriptv0.1.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

md6
const md6 = require('node-md6');
import md6 from 'node-md6';
This package uses the UMD pattern, making `require` the standard for Node.js environments. Direct ESM `import` is not officially supported or intended for this unmaintained v0.1.0 module.
md6
// In a browser, after script inclusion: const hash = md6('hello');
When used in a browser environment (e.g., via a `<script>` tag), the MD6 function is typically exposed globally as `md6` due to its UMD packaging.

Demonstrates how to import the `node-md6` library and compute MD6 hashes of varying lengths for given input strings.

const md6 = require('node-md6'); const inputString = 'The quick brown fox jumps over the lazy dog. This is a test string to demonstrate MD6 hashing.'; const hashResult = md6(inputString, 256); // Compute a 256-bit MD6 hash console.log('Input:', inputString); console.log('MD6 (256-bit) Hash:', hashResult); // Example of another input and hash size const anotherInput = 'Another piece of data for hashing.'; const shortHash = md6(anotherInput, 128); // Compute a 128-bit MD6 hash console.log('Another Input:', anotherInput); console.log('MD6 (128-bit) Hash:', shortHash);
Debug
Known issues
breakingThe `node-md6` package is unmaintained and has not received updates since 2014. This means it may contain unpatched bugs, security vulnerabilities, or incompatibilities with newer Node.js versions or JavaScript engines.
fix
Avoid using this package for new projects. For cryptographic hashing, use Node.js's built-in `crypto` module (e.g., `crypto.createHash('sha256')`) or widely maintained third-party libraries.
affects: 0.1.0
gotchaDespite MD6's design goals for security, this particular implementation's abandonment makes it unsuitable for production cryptographic applications requiring strong security guarantees. The algorithm itself also faced challenges during the SHA-3 competition regarding speed and proof of security for reduced rounds.
fix
For secure hashing, always prefer modern, well-vetted, and actively maintained algorithms and implementations like SHA-256, SHA-512, or SHA-3 from Node.js's native `crypto` module.
affects: 0.1.0
gotchaThe package is at version 0.1.0, indicating an unstable API that could change significantly without adherence to semantic versioning, even if it were maintained.
fix
There is no recommended fix other than migrating to a stable, maintained library. Any usage of this package should be treated as experimental and non-production ready.
affects: 0.1.0
gotchaThis package does not provide TypeScript type definitions, leading to a poorer developer experience and potential type-related errors in TypeScript projects.
fix
Manual declaration files (`.d.ts`) would need to be created if strict TypeScript usage is required, though this is not recommended given the package's abandoned status.
affects: 0.1.0
Errors
Common errors & fixes
TypeError: md6 is not a function
Attempting to call `md6()` after an incorrect import or if the script environment (e.g., browser without script tag) hasn't properly exposed the function.
fix
Ensure you are using `const md6 = require('node-md6');` in Node.js, or that the UMD script has loaded successfully in a browser environment to expose `window.md6`.
Error: Invalid hash length specified
The MD6 function was called with an unsupported hash bit length. MD6 typically supports lengths up to 512 bits.
fix
Provide a valid bit length (e.g., 128, 256, 384, 512) as the second argument to the `md6()` function.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources
node-md6 — npm install node-md6 · libregistry