API Reference

@node-rs/argon2

Native Argon2 password hashing for Node.js via Rust bindings, with async hash, verify, and algorithm selection.

Official Documentation ↗
CompatibilityThis documentation covers version v1.0. Check the official docs for the latest API surface.

Installation

npmnpm install @node-rs/argon2

Methods

@node-rs/argon2 is native argon2 password hashing for node.js via rust bindings, with async hash, verify, and algorithm selection. This page documents the core methods, installation, and common usage patterns for the current stable release.

Installation

Install @node-rs/argon2 with your preferred package manager using the command shown in the frontmatter. The package is published to the npm registry and ships with TypeScript types where applicable.

Core methods

The methods listed in the frontmatter cover the primary API surface. Each signature reflects the v1.0 release. Consult the official documentation linked in sourceUrl for advanced options, edge cases, and breaking changes between major versions.

Frequently asked questions

The faq section in the frontmatter answers the most common questions about @node-rs/argon2, including comparisons with alternatives, configuration tips, and runtime requirements. If your question is not covered, check the source URL for the full guide.

Security

Official security statements captured from the package documentation:

API reference evidence

Fetched from official sources on 2026-11-08T17:29:00+08:00 via WebFetch https://raw.githubusercontent.com/napi-rs/node-rs/main/packages/argon2/index.d.ts.

FAQ

Why native bindings?
Pure JS Argon2 is slow; native bindings use the reference C implementation via Rust for production speed.
Does it work in Electron?
Yes. node-rs packages ship prebuilds for Electron and multiple Node ABIs.
Which variant should I use?
Argon2id is recommended by RFC 9106; it resists both side-channel and GPU attacks.