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

Package detail

@aws-crypto/sha256-js

aws68.6mApache-2.05.2.0TypeScript support: included

A pure JS implementation SHA256.

readme

crypto-sha256-js

A pure JS implementation SHA256.

Usage

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

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-js';

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

5.0.0 (2023-07-13)

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

4.0.0 (2023-02-20)

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

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-js

2.0.0 (2021-10-25)

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

1.2.2 (2021-10-12)

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

1.2.1 (2021-09-17)

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

1.2.0 (2021-09-17)

Features

1.1.0 (2021-01-13)

Bug Fixes

1.0.0 (2020-10-22)

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

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

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

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)

Features

  • sha256-js: expose synchronous digest (#7) (9edaef7), closes #6