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

Indicate byte array inputs are supported too #3

Merged
merged 1 commit into from
Apr 13, 2014

Conversation

shesek
Copy link
Contributor

@shesek shesek commented Apr 11, 2014

I was going to write a wrapper function in my application that adds support for that, but noticed that it already does support that - the input is processed by bytesToWords, which works well with byte arrays. I updated the README to indicate that.

One other thing that should perhaps be looked into is the different APIs that the SHA256 and RIPEMD160 modules expose. SHA256 can return multiple formats, but doesn't support Buffers, while RIPEMD160 only returns buffers. It probably makes sense to unify the interfaces (imho, I think its best to always return buffers and let the user handle other formats in app-land), but it'll probably break some code that depends on that.

jprichardson added a commit that referenced this pull request Apr 13, 2014
Indicate byte array inputs are supported too
@jprichardson jprichardson merged commit 57ad7e1 into browserify:master Apr 13, 2014
@jprichardson
Copy link
Member

Thanks for the contribution. The module sha256 is deprecated. The long-term strategy is for us to "outsource" most of the crypto to browserify (https://github.com/dominictarr/crypto-browserify specifically). It includes sha256 functionality, but not ripemd160 functionality. To mitigate all of this, we've been using the module crypto-hashing to normalize interfaces.

@shesek
Copy link
Contributor Author

shesek commented Apr 14, 2014

Yeah, I got the feeling that crypto-hashing is what you're aiming to use as the primary API and ended up using it as well. Perhaps you should add a deprecation note to the README?

@shesek shesek deleted the patch-1 branch April 14, 2014 09:38
@shesek shesek restored the patch-1 branch April 14, 2014 09:38
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.

None yet

2 participants