multiHash

multiHash是将哈希算法和哈希长度以哈希放在一起,使用base64进行编码的一种哈希。其格式如下:
详情可参见:https://multiformats.io/multi...


hash-func-type:哈希函数类型 sha1:0x11 ,sha2-256:0x12digest-length:是哈希长度
digest-value:是真正的哈希值

例如:

sha1:0x11
length:0x14 (0x14-> 20 -> 20*8=160
sha1("multihash"):88c2f11fb2ce392acb5b2986e640211c4690073e
multiHash:0x111488c2f11fb2ce392acb5b2986e640211c4690073e
base32:CEKIRQXRD6ZM4OJKZNNSTBXGIAQRYRUQA47A====
base58:5dsgvJGnvAfiR3K6HCBc4hcokSfmjj
base64:ERSIwvEfss45KstbKYbmQCEcRpAHPg==
sha-256:0x12
length:0x20(0x20 -> 32 -> 32*8=256)
sha256("multihash"):0x12209cbc07c3f991725836a3aa2a581ca2029198aa420b9d99bc0e131d9f3e2cbe47
multiHash: 0x122012209cbc07c3f991725836a3aa2a581ca2029198aa420b9d99bc0e131d9f3e2cbe47
base32:CIQJZPAHYP4ZC4SYG2R2UKSYDSRAFEMYVJBAXHMZXQHBGHM7HYWL4RY=
base58:QmYtUc4iTCbbfVSDNKvtQqrfyezPPnFvE33wFmutw9PBBk
base64:EiCcvAfD+ZFyWDajqipYHKICkZiqQgudmbwOEx2fPiy+Rw==

你可能感兴趣的:(hash区块链)