# sha512sum

> The same behaviour as linux command with directories support.

Latest version **1.0.9** (published 2017-06-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install sha512sum
pnpm add sha512sum
yarn add sha512sum
bun add sha512sum
```

## 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.0.9 |
| Published | 2017-06-26 |
| First published | 2017-03-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Leo Lozach |
| Maintainers | leelow |
| Keywords | sha512, checksum, checksums |

## Links

- npm: https://www.npmjs.com/package/sha512sum
- Repository: https://github.com/Leelow/sha512sum
- Homepage: https://github.com/Leelow/sha512sum#readme
- Issues: https://github.com/Leelow/sha512sum/issues
- npm.io page: https://npm.io/package/sha512sum

## Dependencies (4)

- [walk](https://npm.io/package/walk.md) ^2.3.9
- [hasha](https://npm.io/package/hasha.md) ^3.0.0
- [slash](https://npm.io/package/slash.md) ^1.0.0
- [defaults](https://npm.io/package/defaults.md) ^1.0.3

## Recent versions

- 1.0.9 (latest) — 2017-06-26
- 1.0.8 — 2017-05-10
- 1.0.7 — 2017-04-05
- 1.0.6 — 2017-04-03
- 1.0.5 — 2017-04-01
- 1.0.4 — 2017-04-01
- 1.0.3 — 2017-04-01
- 1.0.2 — 2017-03-04
- 1.0.1 — 2017-03-02
- 1.0.0 — 2017-03-02

## README

# sha512sum

[![npm version][npm-version-image]][npm-version-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Build Status][travis-image]][travis-url]
[![Build Status][appveyor-image]][appveyor-url]
[![Codacy Coverage][codacy-coverage-image]][codacy-coverage-url]
[![Codacy Grade][codacy-grade-image]][codacy-grade-url]
[![JavaScript Style Guide][javascript-standard-image]][javascript-standard-url]

> The same behaviour as linux command with directories support. [https://linux.die.net/man/1/sha512sum](https://linux.die.net/man/1/sha512sum)

Works on Linux and Windows.

## Install

```
$ npm install --save sha512sum
```

## Usage

> For a file

```js
const sha512sum = require('sha512sum');

// 992 ... 80a  /path/to/file
sha512sum.fromFile('/path/to/file', options, function(err, hash) {
  if (err) throw err
  console.log(hash)
});

console.log(sha512sum.fromFileSync('/path/to/file', options))
```
Similar to linux command:

    $ sha512sum /path/to/file
  
 > For a directory

```js
const sha512sum = require('sha512sum');

// 992 ... 80a  /path/to/dir/h.txt
// erf ... e3f  /path/to/dir/b/e.doc
// cd5 ... r9g  /path/to/dir/b/l.png
// b2r ... v2f  /path/to/dir/c/l.csv
// adr ... 9t6  /path/to/dir/d/o.world
sha512sum.fromDirectory('/path/to/dir', options, function(err, hash) {
  if (err) throw err
  console.log(hash)
});

console.log(sha512sum.fromDirectorySync('/path/to/dir', options))
```

Similar to linux command:

    $ find files -type f -printf "%d%p\n" | sort -n | cut -c 2- | xargs sha512sum

## Options

* cwd: current work directory
* sep: separator between hash and filename, default value is double-space

## License

[MIT](LICENSE) © [Léo Lozach](https://github.com/Leelow)

[downloads-image]: https://img.shields.io/npm/dt/sha512sum.svg?maxAge=3600
[downloads-url]: https://www.npmjs.com/package/sha512sum
[npm-version-image]: https://badge.fury.io/js/sha512sum.svg
[npm-version-url]: https://www.npmjs.com/package/sha512sum
[travis-image]: https://travis-ci.org/Leelow/sha512sum.svg?branch=master
[travis-url]: https://travis-ci.org/Leelow/sha512sum
[appveyor-image]: https://ci.appveyor.com/api/projects/status/ltppe1sp0ucnm6r3?svg=true
[appveyor-url]: https://ci.appveyor.com/project/Leelow/sha512sum
[codacy-coverage-image]: https://api.codacy.com/project/badge/Coverage/32e42e7d81a343e1a9ea01326ca74a40
[codacy-coverage-url]: https://www.codacy.com/app/Leelow/sha512sum?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Leelow/sha512sum&amp;utm_campaign=Badge_Coverage
[codacy-grade-image]: https://api.codacy.com/project/badge/Grade/32e42e7d81a343e1a9ea01326ca74a40
[codacy-grade-url]: https://www.codacy.com/app/Leelow/sha512sum?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Leelow/sha512sum&amp;utm_campaign=Badge_Grade
[javascript-standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
[javascript-standard-url]: http://standardjs.com/

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