Socket
Socket
Sign inDemoInstall

@aws-sdk/hash-node

Package Overview
Dependencies
4
Maintainers
5
Versions
119
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @aws-sdk/hash-node

[![NPM version](https://img.shields.io/npm/v/@aws-sdk/hash-node/latest.svg)](https://www.npmjs.com/package/@aws-sdk/hash-node) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/hash-node.svg)](https://www.npmjs.com/package/@aws-sdk/hash-node)


Version published
Maintainers
5
Created

Package description

What is @aws-sdk/hash-node?

The @aws-sdk/hash-node package is part of the AWS SDK for JavaScript (v3) and is specifically designed for hashing functionalities within Node.js environments. It provides a set of utilities for generating hash digests of data. This can be particularly useful for creating secure, fixed-size representations of data for tasks such as validating the integrity of files, securely storing passwords, or implementing caching mechanisms.

What are @aws-sdk/hash-node's main functionalities?

Generating SHA-256 Hashes

This feature allows you to generate SHA-256 hash digests of data. The code sample demonstrates how to create a new Hash instance, update it with the data to be hashed, and then generate the digest.

const { Hash } = require('@aws-sdk/hash-node');
const hash = new Hash('sha256');
hash.update('data to hash');
const digest = await hash.digest();
console.log(digest);

Streaming Data Hashing

This feature is useful for hashing large files or streaming data. The code sample shows how to create a hash instance, stream a file, update the hash with chunks of the file, and finally generate the digest once the stream ends.

const { Hash } = require('@aws-sdk/hash-node');
const fs = require('fs');
const fileStream = fs.createReadStream('path/to/file');
const hash = new Hash('sha256');
fileStream.on('data', (chunk) => hash.update(chunk));
fileStream.on('end', async () => {
  const digest = await hash.digest();
  console.log(digest);
});

Other packages similar to @aws-sdk/hash-node

Changelog

Source

3.222.0 (2022-12-01)

Features

  • client-codecatalyst: This release adds operations that support customers using the AWS Toolkits and Amazon CodeCatalyst, a unified software development service that helps developers develop, deploy, and maintain applications in the cloud. For more information, see the documentation. (cb94b0c)
  • client-comprehend: Comprehend now supports semi-structured documents (such as PDF files or image files) as inputs for custom analysis using the synchronous APIs (ClassifyDocument and DetectEntities). (5c0d056)
  • client-gamelift: GameLift introduces a new feature, GameLift Anywhere. GameLift Anywhere allows you to integrate your own compute resources with GameLift. You can also use GameLift Anywhere to iteratively test your game servers without uploading the build to GameLift for every iteration. (b38a48f)
  • client-pipes: AWS introduces new Amazon EventBridge Pipes which allow you to connect sources (SQS, Kinesis, DDB, Kafka, MQ) to Targets (14+ EventBridge Targets) without any code, with filtering, batching, input transformation, and an optional Enrichment stage (Lambda, StepFunctions, ApiGateway, ApiDestinations) (c2e00d5)
  • client-sfn: This release adds support for the AWS Step Functions Map state in Distributed mode. The changes include a new MapRun resource and several new and modified APIs. (31a78be)
  • clients: update client endpoints as of 2022-12-01 (75af76d)
  • types: add checksum interface (#4216) (89598b6)
  • utl-retry: add util-retry package and its types (#4224) (a2579b7)

Readme

Source

@aws-sdk/md5-node

NPM version NPM downloads

An internal package

Usage

You probably shouldn't, at least directly.

FAQs

Last updated on 01 Dec 2022

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