Socket
Socket
Sign inDemoInstall

md5-file

Package Overview
Dependencies
0
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    md5-file

Get the MD5-sum of a given file, with low memory usage, even on huge files.


Version published
Weekly downloads
1.2M
increased by4.23%
Maintainers
2
Install size
4.89 kB
Created
Weekly downloads
 

Readme

Source

MD5 file

Get the MD5-sum of a given file, with low memory usage, even on huge files.

Installation

npm install --save md5-file

Usage

As a module

const md5File = require('md5-file')

/* Async usage */
md5File('LICENSE.md').then((hash) => {
  console.log(`The MD5 sum of LICENSE.md is: ${hash}`)
})

/* Sync usage */
const hash = md5File.sync('LICENSE.md')
console.log(`The MD5 sum of LICENSE.md is: ${hash}`)

As a command line tool

$ md5-file LICENSE.md
ad1faf9381e43c471dc381c17a4ee4b6

API

md5File(path: string) => Promise<string>

Asynchronously get the MD5-sum of the file at path.

Returns a Promise that will be resolved with a string containing the MD5-sum.

md5File.sync(path: string) => string

Synchronously get the MD5-sum of the file at path.

License

MIT

Keywords

FAQs

Last updated on 05 Apr 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc