5.0.0 • Published 6 months ago

md5-hex v5.0.0

Weekly downloads
640,958
License
MIT
Repository
github
Last release
6 months 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-2147iotor-lmgulp-haxegulp-ruby-sassgulp-tinypng-unlimitedgulp-pngquant-cachehullabaloo-config-managergitnewsgravatar-urleywakarma-avaember-template-modifier-importember-template-styles-importember-template-component-importember-template-helper-importember-cli-lintember-hbs-importsember-cli-template-lintember-browserifyember-cli-fastbootember-cli-fastboot-with-full-domeligendifugaexpress-wikimedia-collectionsmako-cacheluapackkpdecker-nyckiwidave-ecfksamemory-cache-decoratormotp-clilob-checknaver-bowermouse-hashos-random-tmpdiromni.coreomni.modelsoda-isomorficnodebase-authorize-sdknodebase-healthperfomance-collectreadiness-gqlreally-basic-chat-uiracoon-lmqloud-fiscal-libaun-gulp-sassrecinkdeskbookersrequire-compiledsindresorhus.jsconcordancecopenhagenserverlib-fishersaussemantic-release-gitmoji-actionsvelvet-customtrendnet_device_preset@eki-group/svelvet@epic-web/workshop-app@epic-web/workshop-utils@unsilo/broccoli-typescript-compiler@zhuangya/youdaorun-jstrepofs@morlay/ava@markuskobler/broccoli-typescript-compileryk-sftp-testyk-cmp@turf-rs/turfwwto@my-wufan/hello-napi@lui-dias/swc-napi@shopware-pwa/cliano-lmapella@worldssportsgroup/bowerxwithhold-message-ava@chi_eee/another-test-packagebabel-plugin-files@asemirsk/layouts@asemirsk/tokens@astro-my/sign-request@alloc/html-bundleawesome-react-stars@bodiless/layoutsbabel-front-end-ify@placepass/broccoli-typescript-compiler@qrcode-rs/qrcode@boundless-inc/mobiledoc-dom-rendererava-tfava-no-babelblix_svelvet@ava/babelbindepstart-starwars-libu-wave-gravatars@johnhamlin/redux-persist
5.0.0

6 months ago

4.0.0

3 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.0.0

7 years ago

1.3.0

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago