add sha2-256-trunc2 multihash: 0x1012

SHA2-256 with the trailing 2 bits zeroed out. Primary current use is
Filecoin.

Ref: https://github.com/multiformats/multicodec/pull/161
This commit is contained in:
Rod Vagg 2020-04-16 14:11:24 +10:00
parent 5d3a023767
commit 0aa8f5d132

View File

@ -107,6 +107,7 @@ http, multiaddr, 0x01e0,
json, serialization, 0x0200, JSON (UTF-8-encoded)
messagepack, serialization, 0x0201, MessagePack
libp2p-peer-record, libp2p, 0x0301, libp2p peer record type
sha2-256-trunc254-padded, multihash, 0x1012, SHA2-256 with the two most significant bits from the last byte zeroed (as via a mask with 0b00111111) - used for proving trees as in Filecoin
x11, multihash, 0x1100,
sm3-256, multihash, 0x534d,
blake2b-8, multihash, 0xb201, Blake2b consists of 64 output lengths that give different hashes

1 name tag code description
107 json serialization 0x0200 JSON (UTF-8-encoded)
108 messagepack serialization 0x0201 MessagePack
109 libp2p-peer-record libp2p 0x0301 libp2p peer record type
110 sha2-256-trunc254-padded multihash 0x1012 SHA2-256 with the two most significant bits from the last byte zeroed (as via a mask with 0b00111111) - used for proving trees as in Filecoin
111 x11 multihash 0x1100
112 sm3-256 multihash 0x534d
113 blake2b-8 multihash 0xb201 Blake2b consists of 64 output lengths that give different hashes