multiformats / clj-multihash

Clojure implementation of the Multihash spec
The Unlicense
40 stars 15 forks source link

String rendering #7

Closed jbenet closed 1 year ago

jbenet commented 7 years ago

Saw this in readme:

hash:sha2-256:dbd318c1c462aee872f41109a4dfd3048871a03dedd0fe0e757ced57dad6f2d7

nice-- i ran into the same need when making the CID spec here: https://github.com/ipld/cid#human-readable-cids. I would discourage use of : end prefer - because it would be great if people use the compressed representation in URNs instead of the expanded one... but i can be persuaded.

(I would want to ensure people don't use the string versions to rely on them for identifiers-- as the whole copy-pastability and versatility of multihash goes down with that).

See also

jbenet commented 7 years ago

Oh and i wanted to say: let's propose this for the proper multihash spec, in a section like CID's (maybe "Loggable Multihash" or "Multihash Inspection string" or something that emphasizes dev use but not identifier use)

greglook commented 7 years ago

I would want to ensure people don't use the string versions to rely on them for identifiers

This was one reason I didn't implement a way to decode the URN version back into a multihash. :)

jbenet commented 7 years ago

This was one reason I didn't implement a way to decode the URN version back into a multihash. :)

@greglook :heart:

rvagg commented 1 year ago

closing due to inactivity, archiving repo