Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

aspnet-identity-pw

1.0.2 • Public • Published

aspnet-identity-pw

Node.js package for hashing and validating passwords using the default ASP.NET Identity password hash algorithm.

Installation

npm install aspnet-identity-pw

Usage (Sync)

  var passwordHasher = require('aspnet-identity-pw');
  
  var hashedPassword = passwordHasher.hashPassword('SomePassword');
  
  var isValid = passwordHasher.validatePassword('SomePassword', hashedPassword);

Usage (Async)

  var passwordHasher = require('aspnet-identity-pw');
  var hashedPassword = null;
  var isValid = null;
 
  passwordHasher.hashPassword('SomePassword', function(err, result) {
    hashedPassword = result;
  });
 
  passwordHasher.validatePassword('SomePassword', hashedPassword, function(err, result) {
    isValid = result;
  });

Tests

npm test

Release History

  • 1.0.0 Initial release
  • 1.0.1 Updated deasync package
  • 1.0.2 Fixed crypto.pbkdf2 deprecation warning (requires node >= 0.12.0)

install

npm i aspnet-identity-pw

Downloadsweekly downloads

154

version

1.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability