# data-to-sha1

> Calculates a SHA-1 for given data

Latest version **0.0.1** (published 2018-12-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install data-to-sha1
pnpm add data-to-sha1
yarn add data-to-sha1
bun add data-to-sha1
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2018-12-28 |
| First published | 2018-12-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 1 |
| Unpacked size | 1.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Dimitar Nestorov |
| Maintainers | dimitarnestorov |
| Keywords | sha1, data, string, buffer, checksum, hash, hex, base64, crypto |

## Links

- npm: https://www.npmjs.com/package/data-to-sha1
- Repository: git@github.com:dimitarnestorov/file-to-hash
- Homepage: https://github.com/dimitarnestorov/file-to-hash/tree/master/packages/data-to-sha1
- npm.io page: https://npm.io/package/data-to-sha1

## Dependencies (1)

- [data-to-hash](https://npm.io/package/data-to-hash.md) ^0.0.1

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2018-12-28

## README

# data-to-sha1

> Calculates a SHA-1 of a given buffer/string

## Install

Using yarn:
```sh
yarn add data-to-sha1
```

or using npm:
```sh
npm install data-to-sha1
```

## Usage

```javascript
const fs = require('fs')
const dataToSHA1 = require('data-to-sha1')

const buffer = fs.readFileSync('/path/to/file')

const hash = dataToSHA1(buffer)
```

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