5.0.0 • Published 2 years ago

md5-hex v5.0.0

Weekly downloads
640,958
License
MIT
Repository
github
Last release
2 years ago

md5-hex

Create a MD5 hash with hex encoding

Please don't use MD5 hashes for anything sensitive!

Works in the browser too, when used with a bundler (like Webpack, Rollup, Browserify).

Checkout hasha if you need something more flexible.

Install

npm install md5-hex

Usage

import fs from 'node:fs';
import md5Hex from 'md5-hex';

const buffer = fs.readFileSync('unicorn.png');

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

API

md5Hex(data)

data

Type: Buffer | string | Array<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.

Related

  • crypto-hash - Tiny hashing module that uses the native crypto API in Node.js and the browser
  • hasha - Hashing made simple
  • hash-obj - Get the hash of an object
@bodiless/tokensbrandify-core-lib@victor.accarini/ravendb@infinitebrahmanuniverse/nolb-md5@everything-registry/sub-chunk-2147svelvet-customwithhold-message-avawwto@cush/shell@cybermega/flutter-resource-manager-rs@daiki48/keisankarma-avaiotor-lmstart-starwars-libu-wave-gravatarstrendnet_device_preset@asemirsk/layouts@asemirsk/tokens@ava/babel@astro-my/sign-request@alloc/html-bundle@alien-dom/nebu@bodiless/layouts@chi_eee/another-test-package@boundless-inc/mobiledoc-dom-rendereryk-cmpyk-sftp-test@gtpkg/imgdl@htmelt/plugin@eki-group/svelvet@gaurav9576/broccoli-lint-eslint@ksware/micro-lib-web-temp@kpdecker/nyc@ksware/kingsware-ui@lui-dias/swc-napi@my-wufan/hello-napi@markuskobler/broccoli-typescript-compiler@epic-web/workshop-app@epic-web/workshop-utils@johnhamlin/redux-persist@jg-tpll/malti_search@katerberg/nyc@kentcdodds/workshop-app@kentcdodds/workshop-utils@morlay/ava@qrcode-rs/qrcode@placepass/broccoli-typescript-compiler@shopware-pwa/climouse-hashmotp-clinaver-boweros-random-tmpdiromni.coreomni.modelsoda-isomorficsausrun-jstreadiness-gqlreally-basic-chat-uisemantic-release-gitmoji-actionserverlib-fishernodebase-authorize-sdknodebase-healthperfomance-collectqloud-fiscal-librepofsrequire-compiledrecinkracoon-lmsindresorhus.jsgitnewsgravatar-urlhullabaloo-config-managergulp-ruby-sassgulp-pngquant-cachegulp-haxegulp-tinypng-unlimitedluapackmako-cachelob-checkksakiwidave-ecfkpdecker-nycmemory-cache-decorator@worldssportsgroup/bowerx@turf-rs/turf@unsilo/broccoli-typescript-compiler@zhuangya/youdaobabel-plugin-filesawesome-react-starsano-lmbabel-front-end-ifyapellaconcordancecopenhagendeskbookersava-tfava-no-babelaun-gulp-sassbindep
5.0.0

2 years ago

4.0.0

4 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.0

8 years ago

1.3.0

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago