Hacker News new | ask | show | jobs
by mtdewcmu 3392 days ago
Hashes don't currently know their own lengths, so I don't see why they'd need to.
1 comments

Putting this kind of metadata inline with your hashes is the entire point of multihash:

> Multihash is a protocol for differentiating outputs from various well-established hash functions, addressing size + encoding considerations. It is useful to write applications that future-proof their use of hashes, and allow multiple hash functions to coexist.[0]

[0]: http://multiformats.io/multihash/