Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

argon2

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

argon2 - npm Package Compare versions

Comparing version 0.28.7 to 0.29.0

8

package.json
{
"name": "argon2",
"version": "0.28.7",
"version": "0.29.0",
"description": "An Argon2 library for Node",

@@ -28,3 +28,3 @@ "main": "argon2.js",

"format": "prettier --write \"**/*.{js,json,ts}\"",
"test": "nyc mocha test/test.js",
"test": "c8 mocha test/test.js",
"test:ts": "tsc -p . && node test/test-d.js"

@@ -55,6 +55,6 @@ },

"devDependencies": {
"@types/node": "^18.0.1",
"@types/node": "^18.7.10",
"c8": "^7.12.0",
"mocha": "^10.0.0",
"node-gyp": "^9.0.0",
"nyc": "^15.1.0",
"prettier": "^2.7.1",

@@ -61,0 +61,0 @@ "typescript": "^4.7.4"

@@ -12,7 +12,7 @@ # node-argon2

**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 (default), Argon2d and Argon2id, and
## Usage
It's possible to hash using either Argon2i, Argon2d or Argon2id (default), and
verify if a password matches a hash.

@@ -49,5 +49,5 @@

### 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
### TypeScript usage
A TypeScript type declaration file is published with this module. If you are

@@ -57,3 +57,3 @@ using TypeScript >= 2.0.0 that means you do not need to install any additional

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.

@@ -86,3 +86,3 @@

### 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,

@@ -100,7 +100,7 @@ which node-argon2-ffi **does not support**. Also, while node-argon2-ffi

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).
### Prebuilt Binaries
## Prebuilt binaries
**node-argon2** provides prebuilt binaries from `v0.26.0` onwards. They are

@@ -113,3 +113,3 @@ built per release using GitHub Actions.

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

@@ -119,6 +119,6 @@ source. It is also always recommended to build from source to ensure consistency

### Before Installing
> You can skip this section if the prebuilt binaries works for you.
## Before Installing
> 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

@@ -129,3 +129,3 @@ Studio 2015 or newer.

#### OSX
### OSX
To install GCC >= 5 on OSX, use [homebrew](http://brew.sh/):

@@ -152,14 +152,14 @@ ```console

### FAQ
## FAQ
<details>
<summary>How do I manually rebuild the binaries?</summary>
```console
```bash
$ npx node-pre-gyp rebuild -C ./node_modules/argon2
```
> Run `node-pre-gyp` instead of `node-gyp` because node-argon2's `binding.gyp`
Run `node-pre-gyp` instead of `node-gyp` because node-argon2's `binding.gyp`
file relies on variables from `node-pre-gyp`.
> You can omit `npx` if you have a global installation of `node-pre-gyp`,
You can omit `npx` if you have a global installation of `node-pre-gyp`,
otherwise prefixing `npx` will use the local one in `./node_modules/.bin`

@@ -172,12 +172,12 @@ </details>

</summary>
You can do either of the two methods below:
1. Force build from source on install.
```console
```bash
$ npm install argon2 --build-from-source
```
2. Ignore `node-argon2` install script and build manually.
```console
```bash
$ npm install argon2 --ignore-scripts

@@ -188,5 +188,13 @@ $ npx node-pre-gyp rebuild -C ./node_modules/argon2

<details>
<summary>
I installed Node as a <a href="https://snapcraft.io/node">snap</a>, and I can't install node-argon2.
</summary>
This seems to be an issue related to snap (see [#345 (comment)](https://github.com/ranisalt/node-argon2/issues/345#issuecomment-1164178674)). Installing Node with another package manager, such as [asdf](https://asdf-vm.com/) or [nvm](https://github.com/nvm-sh/nvm), is a possible workaround.
</details>
## Contributors
### Code Contributors
### Code contributors

@@ -196,3 +204,3 @@ This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].

### Financial Contributors
### Financial contributors

@@ -220,3 +228,3 @@ Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/node-argon2/contribute)]

# License
## License
Work licensed under the [MIT License](LICENSE). Please check

@@ -223,0 +231,0 @@ [P-H-C/phc-winner-argon2](https://github.com/P-H-C/phc-winner-argon2) for

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc