Socket
Book a DemoInstallSign in
Socket

aspnetcore-identity-password-hasher

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aspnetcore-identity-password-hasher

NodeJS implementation of ASP.NET Core Identity Password Hasher

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
527
-6.56%
Maintainers
1
Weekly downloads
 
Created
Source

A useful library incase you are migrating user data including hashed passwords from a .NET Core stack to Node.js. Provides a Node.js implementation of ASP.NET Core Identity's Password Hasher including verification support for both V2 and V3.

Getting Started

Install the package using yarn:

yarn add aspnetcore-identity-password-hasher

Or npm:

npm install aspnetcore-identity-password-hasher

Usage

const identity = require('aspnetcore-identity-password-hasher');

Generating a password hash:

Uses the V3 method to generate a password hash. See the note below if you are interested in using the old V2 method.

const password = 'example';

identity.hash(password).then(hashedPassword => {
  // Store the hashed password
});

Verifying plain text password with associated hash:

Is able to verify both V2 and V3 hashes since the format type is included within the payload of the hash.

identity.verify(password, hashedPassword).then(res => {
  // res is true if the plain text password matches with the hash
  // otherwise false.
});

Note

The original PasswordHasher class from .NET Core has been completely ported and is available in src/PasswordHasher.ts. The class includes explicit method for generating V2 password hashes.

FAQs

Package last updated on 08 Feb 2019

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.