ProtoSchool / protoschool.github.io

The code that runs the ProtoSchool website. Visit https://proto.school for interactive tutorials on decentralized web protocols. Explore IPFS and Filecoin through code challenges, code-free lessons, and local events.
https://proto.school
Other
166 stars 67 forks source link

Lesson Feedback%3A Anatomy of a CID - Lesson 6 (One hash, multiple CID versions) #801

Closed mrodriguez3313 closed 2 years ago

mrodriguez3313 commented 2 years ago

What's confusing about this lesson?

I had confusion/ question on this portion under the first screenshot on the title page:

  • Multihash: breakdown of the multihash into the hashing algorithm used (18 is the code for sha2-256), the length of the hash (256 bits, which equates to 32 bytes), and the content hash itself (digest hex).

Where did 18 come from if the code in the screenshot shows 12?

ribasushi commented 2 years ago

The screenshot shows 0x12 which ( 0x... ) is a standard way to denote hexadecimal base. The decimal 18 is 0x12 in hex.

mrodriguez3313 commented 2 years ago

Makes sense. idk why I didn't think about that. Thank you