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

Feature request: Multihash #1781

Open
nileshtrivedi opened this issue Apr 5, 2024 · 0 comments
Open

Feature request: Multihash #1781

nileshtrivedi opened this issue Apr 5, 2024 · 0 comments
Labels

Comments

@nileshtrivedi
Copy link

There's a standard for self-describing hashes called Multihash.

A multihash follows the TLV (type-length-value) pattern.

For example, the multihash value 122041dd7b6443542e75701aa98a0c235951a28a0d851b11564d20022ab11d2589a8 indicates:

  • 12 indicates that the hash function variant is sha2-256
  • 20 indicates that hash length is 32 bytes
  • 41dd7b6443542e75701aa98a0c235951a28a0d851b11564d20022ab11d2589a8 is the hash value

This is already used in IPFS, but is intended for wider adoption to support portability and future-proofing.

It would be great to have an encoding block for producing a multihash of a byte string.

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

No branches or pull requests

1 participant