You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. CIDv0 only supports SHA256 multihashes.
2. In CIDv0, the multibase *can* be specified but defaults to base58btc.
This commit also describes the proper algorithm for decoding CIDs as it's
non-obvious.
Fixesmultiformats#11
1. CIDv0 only supports SHA256 multihashes.
2. In CIDv0, the multibase *can* be specified but defaults to base58btc.
This commit also describes the proper algorithm for decoding CIDs as it's
non-obvious.
Fixesmultiformats#11
Currently,
Prefix.MhLength
is anint
and-1
can be (and is) used to mean "default length". Unfortunately, this means:cid1.Bytes() == cid2.Bytes()
does not implycid1.Prefix() == cid2.Prefix()
.Prefix.Bytes()
is broken.Solutions:
func V1Prefix(codec uint64, mhType uint64) Prefix
). This will break things.Prefix.Bytes()
and provide anEquals
method (less convenient in the long run).Thoughts?
The text was updated successfully, but these errors were encountered: