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

removed dependency on pbkdf2-compat #16

Closed
wants to merge 1 commit into from

Conversation

killerstorm
Copy link

pbkdf2 functions are available via crypto, both the regular one and crypto-browserify.
Thus pbkdf2-compat is an unnecessary.

Actually, not just unnecessary but harmful, it fails in browserified form due to a circular dependency.

@weilu
Copy link
Contributor

weilu commented Oct 17, 2014

Thank you for the suggestion. Node's built-in pbkdf2 doesn't support custom digest methods until 0.11.11. BIP39 needs hmac-sha512 but node 0.10 only supports hmac-sha1, therefore the failed travis build. I'm happy to move on to the built-in cyrpto's pbkdf2 after node 0.12 is released.

testling passes on the current master. Can you elaborate on the browserify failure with steps to reproduce in a separate issue please?

@weilu weilu closed this Oct 17, 2014
@killerstorm
Copy link
Author

Sure. It fails when pbkdf2-compat is loaded before crypto:

var pbkdf2_compat = require('pbkdf2-compat');
var crypto = require('crypto');
var bip39 = require('bip39');
alert(bip39.mnemonicToSeedHex('hello sadjk fljkasdfjkl sfdjak ', ''));

If you reverse the order of the first two lines, it works. Here's complete repro.

I still don't get why it happens that way in our code base, as we don't load pbkdf2-compat explicitly, and I was unable to find package which does it.

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

Successfully merging this pull request may close these issues.

2 participants