Socket
Socket
Sign inDemoInstall

@aws-crypto/sha256-js

Package Overview
Dependencies
5
Maintainers
8
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @aws-crypto/sha256-js

A pure JS implementation SHA256.


Version published
Weekly downloads
17M
increased by2.07%
Maintainers
8
Install size
395 kB
Created
Weekly downloads
 

Package description

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

Changelog

Source

2.0.2 (2022-09-07)

Bug Fixes

  • #337: update @aws-sdk/types (#373) (b26a811), closes #337
  • docs: update README for packages/util (#382) (f3e650e)

Readme

Source

crypto-sha256-js

A pure JS implementation SHA256.

Usage

import {Sha256} from '@aws-crypto/sha256-js';

const hash = new Sha256();
hash.update('some data');
const result = await hash.digest();

Test

npm test

FAQs

Last updated on 07 Sep 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