Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@aws-crypto/sha256-browser

aws55.6mApache-2.05.2.0TypeScript support: included

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.

readme

@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.

Usage

  • To hash "some data" ` import {Sha256} from '@aws-crypto/sha256-browser'

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


- To hmac "some data" with "a key"

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

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

`

Test

npm test

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

5.2.0 (2023-10-16)

Features

  • support ESM artifacts in all packages (#752) (e930ffb)

5.1.0 (2023-09-22)

Bug Fixes

Features

5.0.0 (2023-07-13)

  • feat!: drop support for IE 11 (#629) (6c49fb6), closes #629

BREAKING CHANGES

  • Remove support for IE11

Co-authored-by: texastony 5892063+texastony@users.noreply.github.com

4.0.0 (2023-02-20)

Note: Version bump only for package @aws-crypto/sha256-browser

3.0.0 (2023-01-12)

Bug Fixes

  • docs: sha256 packages, clarify hmac support (#455) (1be5043)

  • feat!: replace Hash implementations with Checksum interface (#492) (da43dc0), closes #492

BREAKING CHANGES

  • All classes that implemented Hash now implement Checksum.

2.0.2 (2022-09-07)

Bug Fixes

2.0.1 (2021-12-09)

Note: Version bump only for package @aws-crypto/sha256-browser

2.0.0 (2021-10-25)

Note: Version bump only for package @aws-crypto/sha256-browser

1.2.2 (2021-10-12)

Note: Version bump only for package @aws-crypto/sha256-browser

1.2.1 (2021-09-17)

Note: Version bump only for package @aws-crypto/sha256-browser

1.2.0 (2021-09-17)

Features

1.1.1 (2021-07-13)

Bug Fixes

  • sha256-browser: throw errors not string (#194) (7fa7ac4)

1.1.0 (2021-01-13)

Bug Fixes

1.0.0 (2020-10-22)

Note: Version bump only for package @aws-crypto/sha256-browser

1.0.0-alpha.0 (2020-02-07)

Note: Version bump only for package @aws-crypto/sha256-browser

0.1.0-preview.4 (2020-01-16)

Bug Fixes

  • Changed package.json files to point to the right Git repo (#9) (028245d), closes #8
  • es2015.iterable required (#10) (6e08d83)
  • lerna version maintains package-lock (#14) (2ef29e1), closes #13

0.1.0-preview.3 (2019-11-15)

Bug Fixes

  • Changed package.json files to point to the right Git repo (#9) (028245d), closes #8
  • es2015.iterable required (#10) (6e08d83)
  • lerna version maintains package-lock (#14) (2ef29e1), closes #13

0.1.0-preview.2 (2019-10-30)

Bug Fixes

  • remove /src/ from .npmignore (for sourcemaps) (#5) (ec52056)