AWS SDK JS Crypto Helpers (SHA256 Browser)

Isomorphic SHA-256 hashing for the browser, preferring native WebCrypto with a pure-JS fallback for full compatibility.

Library
npm
v5.2.0
69stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
46/100Fair
Development Activity48
Maintenance16
Community48
Maturity60
Momentum12

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
66/100Good
Architecture78
Code Quality82
Innovation45
Learning Curve60

@aws-crypto/sha256-browser is the browser-targeted SHA-256 implementation from AWS’s aws-sdk-js-crypto-helpers monorepo, the small collection of cryptographic primitive packages (@aws-crypto/*) that AWS SDK for JavaScript v3 uses internally for request signing (SigV4) and payload integrity checksums. Rather than hand-writing a hash routine, it exposes a single Sha256 class that checks for window.crypto.subtle support at construction time and transparently delegates to the native Web Crypto API when present, falling back to the pure-JavaScript implementation from the sibling @aws-crypto/sha256-js package when it isn’t — giving callers one consistent update/digest/reset interface regardless of runtime.

Because it backs the official AWS SDK’s signing and checksum paths, it’s built to the same reliability bar: typed against a shared Checksum interface, unit-tested with mocha/chai/sinon against stubbed WebCrypto calls, and published under Apache-2.0 alongside its sibling sha256-js, sha256-universal, and supports-web-crypto packages.

What You Get

  • A single Sha256 class implementing update(), digest(), and reset() against a shared Checksum interface
  • Automatic runtime feature detection via @aws-crypto/supports-web-crypto, with zero configuration needed
  • A pure-JS fallback (@aws-crypto/sha256-js) for environments without window.crypto.subtle
  • Both plain hashing and HMAC-with-secret modes through the same constructor signature
  • Dual CJS/ESM builds (build/main, build/module) with TypeScript type declarations

Common Use Cases

  • Computing SigV4 request-signing hashes inside AWS SDK for JavaScript v3 clients running in the browser
  • Verifying S3 payload/content integrity checksums client-side before or after upload
  • Hashing user input or file contents in a web app without shipping a heavier general-purpose crypto library
  • Generating HMAC digests for lightweight browser-side request authentication

Under The Hood

Architecture The package is part of a lerna/npm-workspaces monorepo that exposes a single class, Sha256 (packages/sha256-browser/src/crossPlatformSha256.ts), implementing a shared Checksum interface (update, digest, reset). At construction it calls supportsWebCrypto(locateWindow()) to decide whether to delegate to WebCryptoSha256 (using crypto.subtle.digest/sign/importKey) or fall back to the pure-JS Sha256 from the sibling sha256-js package. It’s a clean strategy/adapter pattern: one thin dispatcher class picks between two interchangeable backends at runtime, both satisfying the same contract, with buffer conversion centralized in a shared util package. Because AWS SDK v3’s signing and checksum code across many clients depends on this exact interface, it functions as a load-bearing shared abstraction rather than a private implementation detail.

Tech Stack Written in TypeScript and compiled twice (tsc) to CJS and ESM outputs with dual package.json exports, managed inside an npm-workspaces plus Lerna monorepo. Sibling workspace dependencies are linked via the file: protocol during development, with pinned semver ranges for external AWS SDK type and utility packages. There’s no runtime framework — it’s a leaf utility package. Testing uses mocha, chai, sinon, and ts-node; releases run through both GitHub Actions and internal AWS CodeBuild pipelines, with a local Verdaccio registry used to dry-run publishes.

Code Quality Tests exist and are meaningful, stubbing crypto.subtle and asserting exact call arguments for both plain digests and HMAC key imports. Error handling is deliberate but minimal — an explicit catch on the key-import promise avoids unhandled-rejection noise while still surfacing errors through the real digest() call. Types are used consistently via shared interfaces, and the test suite itself is type-checked before running. Prettier plus husky/lint-staged enforce formatting on commit, and CI runs on both GitHub Actions and CodeBuild.

What Makes It Unique SHA-256 itself is a standard, well-known algorithm, so the genuinely useful technical choice here is the “prefer native WebCrypto, fall back to pure JS” dispatch hidden behind one stable class name — letting the rest of the AWS SDK v3 ecosystem call a single consistent async hashing API without every caller needing to feature-detect window.crypto.subtle itself. The public API is minimal and requires almost no boilerplate to adopt, though it isn’t something an experienced developer couldn’t reasonably build from scratch.

Used by 10 apps in this directory

TypeScript
99%
Other

Activepieces

Automation · AI Assistants

24,298

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
64
Dependency
Built with
TypeScript99%
Updated today
TypeScript
91%
Apache 2.0

Helicone

Monitoring · AI Development · Analytics

6,133

An open-source AI gateway and LLM observability platform that routes requests to 100+ models while logging cost, latency, and full traces for every call.

View details
69
Repo Health
81
Technical
65
Dependency
Built with
TypeScript91%
Updated 1 weeks ago
TypeScript
99%
MIT

GraphQL Hive

Developer Tools · Devops · Monitoring

484

Open-source GraphQL schema registry and observability platform with breaking change detection, federation support, and CI/CD integration for teams of any size.

View details
89
Repo Health
81
Technical
69
Dependency
Built with
TypeScript99%
Updated 2 days ago
Rust
52%
Other

hoodik

File Storage · Security

1,468

Self-hosted, end-to-end encrypted cloud storage with browser-based encryption and S3-compatible storage support

View details
75
Repo Health
71
Technical
64
Dependency
Built with
Rust52%
TypeScript33%
Vue14%
Updated 1 weeks ago
TypeScript
98%
Other

Langfuse

AI Development · Monitoring

34,264

Open source AI engineering platform for LLM observability, prompt management, evaluation, and debugging — self-host in minutes or use Langfuse Cloud.

View details
92
Repo Health
81
Technical
66
Dependency
Built with
TypeScript98%
Updated yesterday
TypeScript
92%
Other

n8n

Automation · No Code Platforms

203,555

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

View details
95
Repo Health
87
Technical
66
Dependency
Built with
TypeScript92%
Updated today
TypeScript
50%
ZLIB

Portainer

Devops

38,446

A lightweight, open-source web UI that puts Docker, Kubernetes, and Podman management within reach of any team—no CLI expertise required.

View details
92
Repo Health
79
Technical
65
Dependency
Built with
TypeScript50%
Go38%
Updated 5 days ago
JavaScript
55%
AGPL 3.0

ToolJet

Low Code Platforms · No Code Platforms · AI Agents

40,857

Open-source AI-native platform to build and deploy internal tools, workflows, and AI agents with a visual drag-and-drop builder and 80+ data source integrations.

View details
94
Repo Health
81
Technical
63
Dependency
Built with
JavaScript55%
TypeScript38%
Updated today
TypeScript
99%
AGPL 3.0

Webstudio

Design Tools · No Code Platforms

8,910

Open source visual development platform with complete CSS control, headless CMS integration, and full infrastructure ownership

View details
91
Repo Health
79
Technical
60
Dependency
Built with
TypeScript99%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search