Socket
Socket
Sign inDemoInstall

@aws-sdk/hash-node

Package Overview
Dependencies
5
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
Install size
261 kB
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.254.0 (2023-01-19)

Bug Fixes

  • clients: revert timestamp format serialization (#4348) (0633164)
  • util-utf8: add missing dependency in middleware-flexible-checksums (#4349) (1aed07e)

Features

  • checksum: replace Hash with Checksum (#4346) (172b4f3)
  • client-appflow: Adding support for Salesforce Pardot connector in Amazon AppFlow. (cbc9306)
  • client-cloudwatch-logs: Bug fix - Removed the regex pattern validation from CoralModel to avoid potential security issue. (18a3866)
  • client-codeartifact: Documentation updates for CodeArtifact (3a8d890)
  • client-connect: Amazon Connect Chat introduces Persistent Chat, allowing customers to resume previous conversations with context and transcripts carried over from previous chats, eliminating the need to repeat themselves and allowing agents to provide personalized service with access to entire conversation history. (360932e)
  • client-connectparticipant: This release updates Amazon Connect Participant's GetTranscript api to provide transcripts of past chats on a persistent chat session. (b2b008d)
  • client-ec2: Adds SSM Parameter Resource Aliasing support to EC2 Launch Templates. Launch Templates can now store parameter aliases in place of AMI Resource IDs. CreateLaunchTemplateVersion and DescribeLaunchTemplateVersions now support a convenience flag, ResolveAlias, to return the resolved parameter value. (a165989)
  • client-glue: Release Glue Studio Hudi Data Lake Format for SDK/CLI (603c44c)
  • client-groundstation: Add configurable prepass and postpass times for DataflowEndpointGroup. Add Waiter to allow customers to wait for a contact that was reserved through ReserveContact (737c964)
  • client-medialive: AWS Elemental MediaLive adds support for SCTE 35 preRollMilliSeconds. (8f23e93)
  • client-opensearch: This release adds the enhanced dry run option, that checks for validation errors that might occur when deploying configuration changes and provides a summary of these errors, if any. The feature will also indicate whether a blue/green deployment will be required to apply a change. (76d4e0d)
  • client-panorama: Added AllowMajorVersionUpdate option to OTAJobConfig to make appliance software major version updates opt-in. (87eea2c)
  • client-sagemaker: HyperParameterTuningJobs now allow passing environment variables into the corresponding TrainingJobs (ac78b3b)
  • clients: update client endpoints as of 2023-01-19 (f8768aa)

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 19 Jan 2023

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