Socket
Socket
Sign inDemoInstall

md5-file

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

md5-file

return an md5sum of a given file


Version published
Weekly downloads
1.3M
decreased by-1.35%
Maintainers
1
Weekly downloads
 
Created

What is md5-file?

The md5-file npm package is a utility for generating MD5 checksums for files. This can be useful for verifying file integrity, detecting changes, and ensuring data consistency.

What are md5-file's main functionalities?

Generate MD5 checksum for a file

This feature allows you to generate an MD5 checksum for a specified file. The code sample demonstrates how to use the md5-file package to calculate the MD5 hash of a file asynchronously.

const md5File = require('md5-file');
md5File('path/to/file').then(hash => {
  console.log(`The MD5 hash of the file is: ${hash}`);
}).catch(err => {
  console.error(err);
});

Generate MD5 checksum for a file synchronously

This feature allows you to generate an MD5 checksum for a specified file synchronously. The code sample demonstrates how to use the md5-file package to calculate the MD5 hash of a file in a synchronous manner.

const md5File = require('md5-file');
try {
  const hash = md5File.sync('path/to/file');
  console.log(`The MD5 hash of the file is: ${hash}`);
} catch (err) {
  console.error(err);
}

Other packages similar to md5-file

Keywords

FAQs

Package last updated on 20 Jun 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc