diff --git a/README.md b/README.md index e3a8921..0b5f6af 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -node-blake2 -=== +# node-blake2 [![NPM version][npm-image]][npm-url] [![Build status][github-actions-image]][github-actions-url] @@ -19,14 +18,14 @@ node-blake2 was tested to work with the following compilers and platforms: | GCC 8.3.0 10.2.0, 11.2.0 | GNU/Linux Gentoo | x86_64 | | LLVM clang 11.1.0, 13.0.0 | GNU/Linux Gentoo | x86_64 | | GCC 5.4.0 | GNU/Linux Ubuntu 16.04 | x86_64 | +| LLVM clang 11.1.0 | OpenBSD 7.0 | x86_64 | | Apple LLVM clang 9.1.0 | macOS 10.13 | x86_64 | | Visual Studio 2019 | Windows 11 | x86_64 | | Visual Studio 2015 | Windows 10 | x86_64 | | GCC 10.2.1 | GNU/Linux Debian 11.2 | aarch64 Cortex-A57 | | Apple LLVM clang 12.0.5 | macOS 12 | aarch64 Apple M1 | -Prerequisites for building on Windows ---- +## Prerequisites for building on Windows [Visual Studio Build Tools](https://github.com/felixrieseberg/windows-build-tools). @@ -34,24 +33,21 @@ Python is required by [node-gyp](https://github.com/nodejs/node-gyp). Starting with Node.js 12, Windows installer can automatically install Python and Visual Studio build tools. -Install ---- +## Install In your project, run: -``` +```sh npm install blake2 --save ``` or install from the GitHub repo: -``` +```sh npm install vrza/node-blake2 --save ``` - -Examples ---- +## Examples ### Unkeyed BLAKE2b @@ -80,11 +76,10 @@ Although it is not an HMAC, a keyed hash serves the same purpose. ### Important notes -- `blake2.create{Hash,KeyedHash}` support algorithms `blake2b`, `blake2bp`, - `blake2s`, and `blake2sp`. -- Data passed to `.update` on `blake2.{Hash,KeyedHash}` must be a `Buffer`. -- Keys passed to `blake2.createKeyedHash(algo, key)` must be a `Buffer`. -- Just as with `crypto.Hash`, `.digest()` can only be called once. +- `blake2.create{Hash,KeyedHash}` support algorithms `blake2b`, `blake2bp`, `blake2s`, and `blake2sp`. +- Data passed to `.update` on `blake2.{Hash,KeyedHash}` must be a `Buffer`. +- Keys passed to `blake2.createKeyedHash(algo, key)` must be a `Buffer`. +- Just as with `crypto.Hash`, `.digest()` can only be called once. ### With streams @@ -134,10 +129,9 @@ console.log(h.digest()); console.log(j.digest()); ``` -Known issues ---- +## Known issues -- On Windows, node-blake2 requires enabling AVX instructions as a workaround for the way upstream build preprocessor detects support for SSE2. +- On Windows, node-blake2 requires enabling AVX instructions as a workaround for the way upstream build preprocessor detects support for SSE2. [npm-image]: https://img.shields.io/npm/v/blake2.svg [npm-url]: https://npmjs.org/package/blake2 diff --git a/package.json b/package.json index cafdb49..75ffd46 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blake2", - "version": "4.0.3", + "version": "4.1.0", "description": "All four BLAKE2 variants (blake2b, blake2bp, blake2s, blake2sp) for node, with stream support", "keywords": [ "crypto", @@ -20,7 +20,7 @@ }, "main": "index.js", "scripts": { - "test": "./node_modules/.bin/mocha tests/*.js && ./node_modules/.bin/eslint ." + "test": "node node_modules/eslint/bin/eslint . && node node_modules/mocha/bin/mocha tests" }, "dependencies": { "nan": "^2.15.0"