# @aws-crypto/sha256-js

> A pure JS implementation SHA256.

Latest version **5.2.0** (published 2023-10-16) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @aws-crypto/sha256-js
pnpm add @aws-crypto/sha256-js
yarn add @aws-crypto/sha256-js
bun add @aws-crypto/sha256-js
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.2.0 |
| Published | 2023-10-16 |
| First published | 2018-11-07 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16.0.0 |
| Dependencies | 3 |
| Unpacked size | 125.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 69 |
| Author | AWS Crypto Tools Team |
| Maintainers | amzn-oss, seebees, agray256, lavaleri, salkeldr, aws-crypto-tools-ci-bot, mattsb42-aws, farleyb-aws |

## Links

- npm: https://www.npmjs.com/package/@aws-crypto/sha256-js
- Repository: https://github.com/aws/aws-sdk-js-crypto-helpers
- Homepage: https://github.com/aws/aws-sdk-js-crypto-helpers/tree/master/packages/sha256-js
- Issues: https://github.com/aws/aws-sdk-js-crypto-helpers/issues
- npm.io page: https://npm.io/package/@aws-crypto/sha256-js

## Dependencies (3)

- [tslib](https://npm.io/package/tslib.md) ^2.6.2
- [@aws-sdk/types](https://npm.io/package/@aws-sdk/types.md) ^3.222.0
- [@aws-crypto/util](https://npm.io/package/@aws-crypto/util.md) ^5.2.0

## Recent versions

- 5.2.0 (latest) — 2023-10-16
- 5.1.0 — 2023-09-22
- 5.0.0 — 2023-07-13
- 4.0.0 — 2023-02-20
- 3.0.0 — 2023-01-12
- 2.0.2 — 2022-09-07
- 2.0.1 — 2021-12-09
- 2.0.0 — 2021-10-25
- 1.2.2 — 2021-10-13
- 1.2.1 — 2021-09-17
- 1.2.0 — 2021-09-17
- 1.1.0 — 2021-01-13
- 1.0.0 — 2020-10-22
- 1.0.0-alpha.0 — 2020-02-07
- 0.1.0-preview.4 — 2020-01-16
- … 4 more at https://npm.io/package/@aws-crypto/sha256-js/versions

## 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`

---
_Source: https://npm.io/package/@aws-crypto/sha256-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
