Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Streaming? #35

Closed
mikeal opened this issue Jul 24, 2017 · 3 comments
Closed

Streaming? #35

mikeal opened this issue Jul 24, 2017 · 3 comments
Labels
status/ready Ready to be worked

Comments

@mikeal
Copy link

mikeal commented Jul 24, 2017

Heya,

The Node.js crypto libraries support chunked updates to the hash which allows you to stream to it, which I make pretty heavy use of. Can we get a similar feature here?

Also, just out of curiosity, what does ipfs use as the default hashing algorithm?

@daviddias
Copy link
Member

Hey!

This module doesn't do the hashing itself, it just handles the prefixing + identifying the hash func. js-multihashing and js-multihashing-async are the ones we use to do the hashing.

We can have a js-multihashing-stream. However, do note that WebCrypto doesn't support streaming (same as encrypt/decrypt.. which means that the hashing would need to use the JS shim which is considerably slower than WebCrypto in the browser.

@daviddias
Copy link
Member

IPFS uses by default for Files sha2-256, but nowadays it is easy to convert to something else with the use of CIDs :)

@daviddias daviddias added the status/ready Ready to be worked label Jul 27, 2017
@daviddias
Copy link
Member

@mikeal ping if you still need a Stream API vs the just Async

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/ready Ready to be worked
Projects
None yet
Development

No branches or pull requests

2 participants