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

@smithy/md5-js

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/md5-js

[![NPM version](https://img.shields.io/npm/v/@smithy/md5-js/latest.svg)](https://www.npmjs.com/package/@smithy/md5-js) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/md5-js.svg)](https://www.npmjs.com/package/@smithy/md5-js)

  • 3.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3M
decreased by-80.89%
Maintainers
2
Weekly downloads
 
Created

What is @smithy/md5-js?

@smithy/md5-js is an npm package that provides MD5 hashing functionality for JavaScript applications. It is part of the Smithy suite of tools, which are designed to work with AWS SDKs and other Smithy-based projects.

What are @smithy/md5-js's main functionalities?

Generate MD5 Hash

This feature allows you to generate an MD5 hash from a given input string. The code sample demonstrates how to create an MD5 hash of the string 'Hello, world!' and print it in hexadecimal format.

const { Md5 } = require('@smithy/md5-js');

const md5 = new Md5();
md5.update('Hello, world!');
const hash = md5.digestSync();
console.log(Buffer.from(hash).toString('hex'));

Update Hash with Multiple Chunks

This feature allows you to update the MD5 hash with multiple chunks of data. The code sample demonstrates how to update the hash with two separate strings and then generate the final hash.

const { Md5 } = require('@smithy/md5-js');

const md5 = new Md5();
md5.update('Hello, ');
md5.update('world!');
const hash = md5.digestSync();
console.log(Buffer.from(hash).toString('hex'));

Asynchronous Hashing

This feature allows you to perform MD5 hashing asynchronously. The code sample demonstrates how to generate an MD5 hash of the string 'Hello, world!' using a promise-based approach.

const { Md5 } = require('@smithy/md5-js');

const md5 = new Md5();
md5.update('Hello, world!');
md5.digest().then(hash => {
  console.log(Buffer.from(hash).toString('hex'));
});

Other packages similar to @smithy/md5-js

FAQs

Package last updated on 30 Sep 2024

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