wallet-core/node_modules/md5-hex
2017-08-14 05:02:09 +02:00
..
browser.js node_modules 2017-08-14 05:02:09 +02:00
index.js node_modules 2017-08-14 05:02:09 +02:00
license add linting (and some initial fixes) 2017-05-28 00:40:43 +02:00
package.json node_modules 2017-08-14 05:02:09 +02:00
readme.md node_modules 2017-08-14 05:02:09 +02:00

md5-hex Build Status

Create a MD5 hash with hex encoding

Please don't use MD5 hashes for anything sensitive!

Works in the browser too, when used with browserify/webpack.

Checkout hasha if you need something more flexible.

Install

$ npm install --save md5-hex

Usage

const fs = require('fs');
const md5Hex = require('md5-hex');
const buffer = fs.readFileSync('unicorn.png');

md5Hex(buffer);
//=> '1abcb33beeb811dca15f0ac3e47b88d9'

API

md5Hex(input)

input

Type: Buffer string Buffer[] string[]

Prefer buffers as they're faster to hash, but strings can be useful for small things.

Pass an array instead of concatenating strings and/or buffers. The output is the same, but arrays do not incur the overhead of concatenation.

License

MIT © Sindre Sorhus