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

Support streaming #8

Closed
dcousens opened this issue May 26, 2015 · 7 comments
Closed

Support streaming #8

dcousens opened this issue May 26, 2015 · 7 comments
Assignees

Comments

@dcousens
Copy link
Member

No description provided.

@dcousens dcousens self-assigned this May 26, 2015
@dcousens
Copy link
Member Author

Ref browserify/sha.js#25

@jprichardson
Copy link
Member

According to what you've said previously, shouldn't streaming be in a new module? This way those who don't need it can just use the function in ripemd160, but those that do could call ripemd160-streaming? Then ripemd160-streaming could include ripemd160.

@dcousens
Copy link
Member Author

Unfortunately, it is integral to the block padding which is currently done in https://github.com/crypto-browserify/ripemd160/blob/master/lib/ripemd160.js#L173-L208.

Granted, we could do what is done by createHash and instead just delay the call to the ripemd160 until the digest, but, that isn't really supporting streaming, thats just deferred execution with unnecessary storage of all the data. Aka, not streaming.

@jprichardson
Copy link
Member

So you're stating that it's not possible to have two separate modules i.e. it's not possible to have ripemd160-streaming that includes ripemd160?

@dcousens
Copy link
Member Author

@jprichardson well, we could have two modules. But this module as it stands would be abandoned [by crypto-browserify] because ripemd160-streaming is what we would use for the ripemd160 drop in.
No reason this module can't live on otherwise though.

it's not possible to have ripemd160-streaming that includes ripemd160?

It's certainly possible to put it in the exports, but, it serves no purpose to crypto-browserify, as we can't use it (except in the way it is currently being used, which, obviously, would be superseded by ripemd160-streaming).

@fanatid
Copy link
Contributor

fanatid commented Apr 9, 2016

we could create module that contain ripemd160 primitives (block handler and padding creator) -- ripemd160-primitives for example, then use this primitives in ripemd160-1shot and current ripemd160 (supports streams and based on hash-base)
but I think it's too overhead %) so, why not just stay with version with streams...?

@fanatid
Copy link
Contributor

fanatid commented Apr 12, 2016

streams are supported with hash-base

@fanatid fanatid closed this as completed Apr 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants