Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #346

Merged
merged 3 commits into from
Aug 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
Bindings to the reference [Argon2](https://github.com/P-H-C/phc-winner-argon2)
implementation.

**Want to use it on command line? Instead check
**Want to use it on the command line? Instead check
[node-argon2-cli](https://github.com/ranisalt/node-argon2-cli).**

## Usage
It's possible to hash using either Argon2i, Argon2d and Argon2id (default), and
It's possible to hash using either Argon2i, Argon2d or Argon2id (default), and
verify if a password matches a hash.

To hash a password:
Expand Down Expand Up @@ -45,14 +45,14 @@ try {
```

### Migrating from another hash function
See [this article on the wiki](https://github.com/ranisalt/node-argon2/wiki/Migrating-from-another-hash-function) for steps how to migrate your existing code to Argon2. It's easy!
See [this article on the wiki](https://github.com/ranisalt/node-argon2/wiki/Migrating-from-another-hash-function) for steps on how to migrate your existing code to Argon2. It's easy!

### TypeScript usage
A TypeScript type declaration file is published with this module. If you are
using TypeScript >= 2.0.0 that means you do not need to install any additional
typings in order to get access to the strongly typed interface. Simply use the
library as mentioned above. This library uses Promises, so make sure you are
targeting ES6+, including the es2015.promise lib in your build, or globally
targeting ES6+, including the `es2015.promise` lib in your build, or globally
importing a Promise typings library.

Some example tsconfig.json compiler options:
Expand Down Expand Up @@ -80,7 +80,7 @@ const hash = await argon2.hash(..);
```

### Differences from [node-argon2-ffi](https://github.com/cjlarose/argon2-ffi)
The interface of both are very similar, notably node-argon2-ffi splits the
The interface of both are very similar, notably, node-argon2-ffi splits the
argon2i and argon2d function set, but this module also has the argon2id option,
which node-argon2-ffi **does not support**. Also, while node-argon2-ffi
suggests you promisify `crypto.randomBytes`, node-argon2 library does that
Expand All @@ -93,7 +93,7 @@ but both can perform around 130 hashes/second on an Intel Core i5-4460 @ 3.2GHz
with default options.

This library is implemented natively, meaning it is an extension to the node
engine. Thus, half of the code are C++ bindings, the other half are Javascript
engine. Thus, half of the code is C++ bindings, the other half is Javascript
functions. node-argon2-ffi uses ffi, a mechanism to call functions from one
language in another, and handles the type bindings (e.g. JS Number -> C++ int).

Expand All @@ -105,15 +105,15 @@ The current prebuilt binaries are built (and tested) with the following matrix:
1. Node 12.x, 14.x, 16.x
2. Ubuntu 18.04, Alpine Linux, Windows Server 2019, macOS Catalina 10.15

If your plaform is below the above requirements, you can follow the
If your platform is below the above requirements, you can follow the
[Before Installing](#before-installing) section below to manually compile from
source. It is also always recommended to build from source to ensure consistency
of the compiled module.

## Before Installing
> You can skip this section if the prebuilt binaries works for you.
> You can skip this section if the prebuilt binaries work for you.

You **MUST** have a **node-gyp** global install before proceeding with install,
You **MUST** have a **node-gyp** global install before proceeding with the install,
along with GCC >= 5 / Clang >= 3.3. On Windows, you must compile under Visual
Studio 2015 or newer.

Expand Down