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

@aws-crypto/sha256-js

Package Overview
Dependencies
Maintainers
8
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-crypto/sha256-js

A pure JS implementation SHA256.

  • 4.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20M
increased by0.59%
Maintainers
8
Weekly downloads
 
Created

What is @aws-crypto/sha256-js?

The @aws-crypto/sha256-js package is a JavaScript implementation of the SHA-256 hash function. It is part of the AWS SDK for JavaScript and is used to compute SHA-256 cryptographic hash values. This package is particularly useful when working with AWS services that require SHA-256 hashes, such as signing requests for AWS Signature Version 4.

What are @aws-crypto/sha256-js's main functionalities?

Computing SHA-256 hash

This feature allows you to compute the SHA-256 hash of a given input. The code sample demonstrates how to create a new instance of the Sha256 class, update it with the data to be hashed, and then compute the digest.

const { Sha256 } = require('@aws-crypto/sha256-js');

async function computeHash(data) {
  const hash = new Sha256();
  hash.update(data);
  return hash.digest();
}

computeHash('data to hash').then(console.log);

Other packages similar to @aws-crypto/sha256-js

FAQs

Package last updated on 20 Feb 2023

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