Skip to content

[WIP] require browser version of create-hmac in browser.js #26

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

Closed
wants to merge 1 commit into from

Conversation

fanatid
Copy link
Contributor

@fanatid fanatid commented Feb 26, 2016

No description provided.

@dcousens
Copy link
Member

Why?

@fanatid
Copy link
Contributor Author

fanatid commented Feb 27, 2016

because create-hmac does same https://github.com/crypto-browserify/createHmac/blob/27f170f06fd958070d3e848afc706c4cc4debda5/browser.js#L2
it gives ability to use pure javascript pbkdf2 with pure hmac/hash

@dcousens
Copy link
Member

And what about if I wanted javascript pbkdf2 and native HMAC?

@fanatid
Copy link
Contributor Author

fanatid commented Feb 27, 2016

Can you describe your case?

@dcousens
Copy link
Member

@fanatid PBKDF-SHA256 on Node 10 (though, its not so relevant now)

@fanatid
Copy link
Contributor Author

fanatid commented Feb 28, 2016

oh, I forgot about this :(
but I still think, that browser by default should export pure javascript version

maybe we should make something like this?

function createPBKDF2 (hmac) {
 ...
}

module.exports = createPBKDF2(require('create-hmac/browser'))
module.exports.native = createPBKDF2(require('create-hmac'))

or move node v0.10 code to another file?

@fanatid
Copy link
Contributor Author

fanatid commented Feb 29, 2016

Related project where would be nice have pure js pbkdf2: https://github.com/cryptocoinjs/scryptsy

@fanatid fanatid changed the title require browser version of create-hmac in browser.js [WIP] require browser version of create-hmac in browser.js Feb 29, 2016
@dcousens
Copy link
Member

Why does that need pure JS pbkdf2?

@fanatid
Copy link
Contributor Author

fanatid commented Feb 29, 2016

Honestly, I don't know :)
maybe for somebody it will be reasonable use pure js, because it easy for review
or use pure js for benchmarks

@dcousens
Copy link
Member

NACK, you can force browser via browserify if you need to IIRC?

@fanatid
Copy link
Contributor Author

fanatid commented Mar 1, 2016

ok, I'll close this right now,
but we can back to this issue in October 2016, when node v0.10 will no longer maintenance :)

@fanatid fanatid closed this Mar 1, 2016
@fanatid fanatid deleted the fix/browser-create-hmac branch March 1, 2016 04:51
@dcousens
Copy link
Member

dcousens commented Mar 1, 2016

👍

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

Successfully merging this pull request may close these issues.

2 participants