Registry / security / md5-node

md5-node

JSON →
library1.0.1jsnpmunverified

md5-node is a minimal Node.js library for computing MD5 hashes of strings. It wraps blueimp/JavaScript-MD5 into a CommonJS module for easy server-side use. Version 1.0.1 is the latest release, with no active development; the library is outdated and does not support streaming, Buffers, or ESM imports. It is intended for legacy projects that need a quick MD5 hash in Node.js, but users are strongly advised to use Node's built-in crypto module instead for security and performance reasons.

npm install md5-node
INSTALL
IMPORT
SIG · MD5-NODE
M
md5-node
securityjavascriptv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

default
const md5 = require('md5-node');
import md5 from 'md5-node';
Library is CommonJS-only (no ESM support). Use require().
no-named-export
const h = require('md5-node'); h('test');
const { md5 } = require('md5-node');
No named export `md5`; the default export is the function itself.
function-usage
const md5 = require('md5-node'); md5('input');
require('md5-node')('input');
Works only with string arguments; does not support Buffers.

Shows basic require and usage of md5-node to hash a string.

const md5 = require('md5-node'); const hash = md5('hello world'); console.log(hash); // '5eb63bbbe01eeed093cb22bb8f5acdc3'
Debug
Known issues
deprecatedMD5 is cryptographically broken and unsuitable for security purposes.
fix
Use Node.js crypto module with SHA-256 or SHA-3 for hash needs.
affects: all
gotchaLibrary only accepts strings; passing a Buffer returns incorrect hash or throws.
fix
Convert Buffer to string first: md5(buf.toString('utf8')).
affects: >=1.0.0
gotchaThe package name is 'md5-node' on npm, but the require path is 'md5-node' (not 'node-md5' as in older docs).
fix
Use require('md5-node') or require('node-md5') if using older version.
affects: >=1.0.0
breakingNo support for ESM import (import statement).
fix
Use dynamic import: const md5 = await import('md5-node'); (but note default export behavior).
affects: all
Errors
Common errors & fixes
TypeError: md5 is not a function
Using named import `{ md5 }` from a default-export-only module.
fix
Use `const md5 = require('md5-node');`
Cannot find module 'node-md5'
Mixing up package name 'md5-node' with old package name 'node-md5'.
fix
Run `npm install md5-node` and use `require('md5-node')`.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
md5-node — npm install md5-node · libregistry