New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@node-rs/argon2

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@node-rs/argon2

RustCrypto: Argon2 binding for Node.js

2.0.2
latest
Source
npm
Version published
Maintainers
2
Created

What is @node-rs/argon2?

@node-rs/argon2 is a Node.js binding for the Argon2 password hashing algorithm, which is designed to be memory-hard and CPU-intensive to resist brute-force attacks. This package provides a fast and efficient way to hash and verify passwords using Argon2.

What are @node-rs/argon2's main functionalities?

Hashing a password

This feature allows you to hash a password using the Argon2 algorithm. The code sample demonstrates how to hash a password asynchronously and log the resulting hash.

const argon2 = require('@node-rs/argon2');
(async () => {
  const hash = await argon2.hash('password123');
  console.log(hash);
})();

Verifying a password

This feature allows you to verify a password against a previously generated hash. The code sample demonstrates how to hash a password and then verify it, logging the result of the verification.

const argon2 = require('@node-rs/argon2');
(async () => {
  const hash = await argon2.hash('password123');
  const isValid = await argon2.verify(hash, 'password123');
  console.log(isValid); // true
})();

Other packages similar to @node-rs/argon2

Keywords

argon2

FAQs

Package last updated on 05 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts