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

Add flag to ipfs add to select hash function to use #3917

Closed
whyrusleeping opened this issue May 12, 2017 · 4 comments
Closed

Add flag to ipfs add to select hash function to use #3917

whyrusleeping opened this issue May 12, 2017 · 4 comments
Assignees
Milestone

Comments

@whyrusleeping
Copy link
Member

I see this as step 1 towards enabling blake2b support. This flag could even default to blake2b-256

@whyrusleeping whyrusleeping added this to the Ipfs 0.4.10 milestone May 12, 2017
@kevina
Copy link
Contributor

kevina commented May 12, 2017

@whyrusleeping With the way you had me write the flag to select the CID version this should be easy to do. Do you want me to take this one it will probably only take me a few hours, including tests.

@kevina kevina self-assigned this May 12, 2017
@kevina kevina added the status/in-progress In progress label May 12, 2017
@kevina
Copy link
Contributor

kevina commented May 12, 2017

Okay this seams really straightforward and easy to do I will go ahead and knock this one off.

@whyrusleeping
Copy link
Member Author

@kevina Yeah! go ahead :)

@kevina
Copy link
Contributor

kevina commented May 12, 2017

@whyrusleeping

Setting the default to blake2b-256 would be an incompatible change so its best that it defaults to "sha2-256" for now.

Also CidV0 technically supports different hashes, but in practice this will cause decoding problems so this will only work with CidV1. The only question is should --hash=sha2-256 function also set the Cid version to 1. All other values will only work CidV1 so its best to just (unconditionally) set 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

No branches or pull requests

2 participants