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

@node-rs/argon2

Package Overview
Dependencies
Maintainers
2
Versions
23
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

  • 1.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
102K
decreased by-10.95%
Maintainers
2
Weekly downloads
 
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

FAQs

Package last updated on 18 Jan 2022

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

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