# blake2s

> port of Dmitry Chestnykh's blake2s-js to node style

Latest version **1.1.0** (published 2015-03-07) · Public Domain license · 0 weekly downloads

## Install

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

## 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.1.0 |
| Published | 2015-03-07 |
| First published | 2014-01-27 |
| Weekly downloads | 0 |
| License | Public Domain |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Dominic Tarr |
| Maintainers | dominictarr |
| Keywords | hash, blake2, blake2s |

## Links

- npm: https://www.npmjs.com/package/blake2s
- Repository: https://github.com/dominictarr/blake2s
- Issues: https://github.com/dominictarr/blake2s/issues
- npm.io page: https://npm.io/package/blake2s

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2015-03-07
- 1.0.1 — 2014-07-24
- 1.0.0 — 2014-01-27

## README

# BLAKE2s

A port of Dmitry Chestnykh's typescript blake2s implementation to node.js style javascript

[![build status](https://secure.travis-ci.org/dominictarr/blake2s.png)](http://travis-ci.org/dominictarr/blake2s)

[![testling badge](https://ci.testling.com/dominictarr/blake2s.png)](https://ci.testling.com/dominictarr/blake2s)


I've left the blake2s.ts script in the source, and edited the output javascript.
I did try to bring the typescript to node.js style, using `Buffer`, `update(buffer, enc)`
but that made a lot of type errors, and in my opinion, type errors are not
really the hardest part of programming. I will be happy if someone can show
me how to correct the typescript implementation to node.js style.

## Usage

``` js
        // constructor accepts digest length in bytes
var h = new BLAKE2s(32)
        //pass encoding into update, like in node's crypto module
h.update("string or array of bytes", 'utf8')
        //request the digest encoding
h.digest('hex')

// Keyed:
var h = new BLAKE2s(32, "some key")
...
```

## Demo

[http://www.dchest.org/blake2s-js/](http://www.dchest.org/blake2s-js/)

## License

PUBLIC DOMAIN DEDICATION

Written in 2012 by Dmitry Chestnykh.

To the extent possible under law, the author have dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide. This software is distributed without any warranty.
http://creativecommons.org/publicdomain/zero/1.0/

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