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

@aws-crypto/sha256-browser

Package Overview
Dependencies
Maintainers
8
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-crypto/sha256-browser

SHA256 wrapper for browsers that prefers `window.crypto.subtle` but will fall back to a pure JS implementation in @aws-crypto/sha256-js to provide a consistent interface for SHA256.

  • 5.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15M
decreased by-7.87%
Maintainers
8
Weekly downloads
 
Created

What is @aws-crypto/sha256-browser?

The @aws-crypto/sha256-browser npm package is a JavaScript implementation of the SHA-256 cryptographic hash function specifically optimized for browser environments. It is part of the AWS SDK for JavaScript and is used to generate SHA-256 hashes of data, which is a common requirement for various security-related operations such as data integrity checks, digital signatures, and password hashing.

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

Generating SHA-256 hash

This feature allows you to generate a SHA-256 hash of the given data. The code sample demonstrates how to import the Sha256 class, create a new instance, update it with data, and then obtain the digest (the hash) as a promise.

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

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

const data = new Uint8Array([/* data bytes here */]);
hashData(data).then(digest => {
  console.log(digest);
});

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

FAQs

Package last updated on 22 Sep 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