multiformats / cid-utils-website

A website for decoding CIDs
https://cid.ipfs.tech/#bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
33 stars 30 forks source link

Add tool to convert human-readable to encoded CID format #3

Open olizilla opened 6 years ago

olizilla commented 6 years ago

Add a CID builder that lets you create a CID from drop downs for each multiformat, or let's you paste in a human CID to get the encoded version out.

SgtPooki commented 1 year ago

@olizilla Is there still value in this ask? I feel like the human CID -> encoded version is solved already.

For the CID builder, it would be cool if each of the inputs for a CID were supported:

<base>base(<cid-version><multicodec><multihash-algorithm><multihash-length><multihash-hash>)

Where inputs in the builder would be:

  1. CID version to use (V0 would pre-select required values as mentioned at https://proto.school/anatomy-of-a-cid/06#converting-cid-versions)
  2. Base (disabled and set to base58btc when CID version is 0)
  3. codec to use (disabled and set to dag-pb when CID version 0 is used)
  4. hashing algorithm to use (disabled and set to sha2-256 when CID version 0 is used)
  5. hash length (disabled and set to 32 when CID version 0 is used)
  6. file/content (file or string input)