to-md5
v1.0.0
Published
A lightweight ES module implementation of MD5 hashing
Downloads
3
Maintainers
Readme
// File: README.md
to-md5
A lightweight ES module implementation of MD5 hashing for both browser and Node.js environments.
Installation
npm install to-md5Usage
import { toMd5 } from 'to-md5';
// Basic usage - returns hex string
console.log(toMd5('hello world')); // '5eb63bbbe01eeed093cb22bb8f5acdc3'
// Get raw numeric array output
console.log(toMd5('hello world', { rawOutput: true }));
// Returns array of 4 32-bit integersAPI
toMd5(str, options?)
Parameters
str: String to hashoptions(optional): Configuration objectrawOutput: If true, returns raw numeric array instead of hex string
Returns
- By default: MD5 hash as a 32-character hex string
- With
rawOutput: true: Array of four 32-bit integers
License
MIT
