fix: need to prepend HashTypeBlake3 prefix to bodyBytes for b3hash

This commit is contained in:
Derrick Hammer 2024-03-01 02:29:22 -05:00
parent 365ba04844
commit 7c6d11258f
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ func (m *MediaMetadata) decodeProof(dec *msgpack.Decoder) error {
childDec := msgpack.NewDecoder(bytes.NewReader(all[:proofSectionLength])) childDec := msgpack.NewDecoder(bytes.NewReader(all[:proofSectionLength]))
b3hash := blake3.Sum256(bodyBytes) b3hash := blake3.Sum256(append([]byte{byte(types.HashTypeBlake3)}, bodyBytes...))
arrayLen, err := childDec.DecodeArrayLen() arrayLen, err := childDec.DecodeArrayLen()
if err != nil { if err != nil {