Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

md5-file

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

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.

  • 5.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
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 05 Apr 2020

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