# cross-sha256

> SHA-256 hash in pure javascript

Latest version **1.2.0** (published 2021-11-01) · (MIT AND BSD-3-Clause) license · 0 weekly downloads

## Install

```sh
npm install cross-sha256
pnpm add cross-sha256
yarn add cross-sha256
bun add cross-sha256
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2021-11-01 |
| First published | 2020-08-19 |
| Weekly downloads | 0 |
| License | (MIT AND BSD-3-Clause) |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 23.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Dominic Tarr |
| Maintainers | zone117x |

## Links

- npm: https://www.npmjs.com/package/cross-sha256
- Repository: https://github.com/zone117x/cross-sha256
- Issues: https://github.com/zone117x/cross-sha256/issues
- npm.io page: https://npm.io/package/cross-sha256

## Dependencies (1)

- [buffer](https://npm.io/package/buffer.md) ^5.6.0

## Recent versions

- 1.2.0 (latest) — 2021-11-01
- 1.1.2 — 2020-08-19
- 1.1.1 — 2020-08-19
- 1.1.0 — 2020-08-19

## README

# cross-sha256
[![NPM Package](https://img.shields.io/npm/v/cross-sha256.svg?style=flat-square)](https://www.npmjs.org/package/cross-sha256)
[![Build Status](https://github.com/zone117x/cross-sha256/workflows/Build/badge.svg)](https://github.com/zone117x/cross-sha256/actions)


Isomorphic `SHA-256` with minimal dependencies. Uses the Node.js `crypto` module if available, otherwise uses a JS implementation (e.g. in browser environments).

```ts
import { sha256 } from 'cross-sha256'

console.log(new sha256().update('42').digest('hex'))
// => 73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049
```

## Acknowledgements
This work is derived from Paul Johnston's [A JavaScript implementation of the Secure Hash Algorithm](http://pajhome.org.uk/crypt/md5/sha1.html).


## LICENSE [MIT](LICENSE)

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