# sha256-file

> return an sha256sum of a given file

Latest version **1.0.0** (published 2018-03-03) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-03-03 |
| First published | 2018-03-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/sha256-file) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Souta Ozaki |
| Maintainers | so-ta |
| Keywords | sha256, sha256sum, checksum |

## Links

- npm: https://www.npmjs.com/package/sha256-file
- Repository: https://github.com/so-ta/sha256-file
- Issues: http://github.com/so-ta/sha256-file/issues
- npm.io page: https://npm.io/package/sha256-file

## Recent versions

- 1.0.0 (latest) — 2018-03-03

## README

# sha256-file

> Simply return an `sha256` sum of a given file. If using async version (by including callback), it will stream; successfully tested on files 4 GB+.

### Installation

```
$ npm install sha256-file
```

__Test:__

```
$ npm test
```

### API

__sha1File(path, [callback])__

```javascript
var sha256File = require('sha256-file');

// sync (no callback)

sha256File('./path/to/a_file'); // '345eec8796c03e90b9185e4ae3fc12c1e8ebafa540f7c7821fb5da7a54edc704'

// async/streamed (if using callback)

sha256File('./path/to/a_file', function (error, sum) {
  if (error) return console.log(error);
  console.log(sum) // '345eec8796c03e90b9185e4ae3fc12c1e8ebafa540f7c7821fb5da7a54edc704'
})
```

### License

MIT  

### Thanks
sha256-file is based on [sha1-file](https://github.com/roryrjb/sha1-file)

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