Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Node.js port, supporting Node.js >=4 #81

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

numtel
Copy link

@numtel numtel commented Sep 1, 2016

  • Port from the Java implementation
  • Can be published to NPM as-is
  • Tests compatibility with PHP implentation

@numtel numtel force-pushed the node-js branch 12 times, most recently from cd0580f to e5c6e99 Compare September 2, 2016 00:24
@numtel numtel changed the title Add Node.js port, supporting Node.js >=4.3.2 Add Node.js port, supporting Node.js >=4 Sep 2, 2016

// Compute the hash of the provided password, using the same salt,
// iteration count, and hash length
crypto.pbkdf2(initBuffer(password, 'utf8'), salt, iterations, storedHashSize, digest,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node.js < 6 will output a different hash if there's unicode characters in the password unless that password is given as a Buffer instead of string.

Sorry about any Travis CI spams incurred from my 15 build attempts. 😅

@defuse
Copy link
Owner

defuse commented Feb 4, 2017

I thought I should leave a comment -- I'm really glad this exists! I'm leaving this pull request open because I haven't been able to find the time to properly verify its security and maintain it. Hopefully anyone looking for a Node.js implementation will find it here. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants