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

spark-md5

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spark-md5

Lightning fast normal and incremental md5 for javascript

  • 3.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
842K
decreased by-13.16%
Maintainers
1
Weekly downloads
 
Created

What is spark-md5?

The spark-md5 npm package is a fast and lightweight library for generating MD5 hashes in JavaScript. It is particularly useful for hashing large files or data streams in the browser or in Node.js environments.

What are spark-md5's main functionalities?

Hashing a String

This feature allows you to generate an MD5 hash from a simple string input. It is useful for hashing small pieces of data quickly.

const SparkMD5 = require('spark-md5');
const hash = SparkMD5.hash('Hello, world!');
console.log(hash); // Outputs the MD5 hash of the string

Hashing an ArrayBuffer

This feature allows you to generate an MD5 hash from an ArrayBuffer, which is useful for hashing binary data or files.

const SparkMD5 = require('spark-md5');
const buffer = new TextEncoder().encode('Hello, world!');
const hash = SparkMD5.ArrayBuffer.hash(buffer);
console.log(hash); // Outputs the MD5 hash of the ArrayBuffer

Incremental Hashing

This feature allows you to generate an MD5 hash incrementally, which is useful for hashing large data streams or files in chunks.

const SparkMD5 = require('spark-md5');
const spark = new SparkMD5();
spark.append('Hello, ');
spark.append('world!');
const hash = spark.end();
console.log(hash); // Outputs the MD5 hash of the concatenated string

Other packages similar to spark-md5

Keywords

FAQs

Package last updated on 25 Aug 2021

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