• Eric Myhre's avatar
    Extract multi{codec,hash} registries better. · 8fef5312
    Eric Myhre authored
    And, make a package which can be imported to register "all" of the
    multihashes.  (Or at least all of them that you would've expected
    from go-multihash.)
    
    There are also packages that are split roughly per the transitive
    dependency it brings in, so you can pick and choose.
    
    This cascaded into more work than I might've expected.
    Turns out a handful of the things we have multihash identifiers for
    actually *do not* implement the standard hash.Hash contract at all.
    For these, I've made small shims.
    
    Test fixtures across the library switch to using sha2-512.
    Previously I had written a bunch of them to use sha3 variants,
    but since that is not in the standard library, I'm going to move away
    from that so as not to re-bloat the transitive dependency tree
    just for the tests and examples.
    8fef5312
multihash.go 2.03 KB