This code looks an awful lot like it's doing a murmur3-32, and returning four bytes:
|
func sumMURMUR3(data []byte, length int) ([]byte, error) { |
|
number := murmur3.Sum32(data) |
|
bytes := make([]byte, 4) |
|
for i := range bytes { |
|
bytes[i] = byte(number & 0xff) |
|
number >>= 8 |
|
} |
|
return bytes, nil |
|
} |
And this code looks an awful lot like it's registering the above code as murmur3-128, which I suspect ought to return more than four bytes:
|
RegisterHashFunc(MURMUR3_128, sumMURMUR3) |
Should I be worried?
And if this is a bug, how comfortable are we about fixing it vs potentially breaking things that rely on the current behavior?
This code looks an awful lot like it's doing a murmur3-32, and returning four bytes:
go-multihash/sum.go
Lines 146 to 154 in 6f1ea18
And this code looks an awful lot like it's registering the above code as murmur3-128, which I suspect ought to return more than four bytes:
go-multihash/sum.go
Line 202 in 6f1ea18
Should I be worried?
And if this is a bug, how comfortable are we about fixing it vs potentially breaking things that rely on the current behavior?