Simhash4J icon indicating copy to clipboard operation
Simhash4J copied to clipboard

hash32 fails to apply masking using 0xff to the 3 remaining bytes.

Open looly opened this issue 2 years ago • 0 comments

This implementation contains a sign-extension bug in the finalization step of any bytes left over from dividing the length by 4.

https://github.com/xlturing/Simhash4J/blob/master/src/main/java/bee/simhash/main/Murmur3.java#L62

fix please see: https://github.com/apache/commons-codec/blob/master/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java#L397

looly avatar Sep 20 '22 08:09 looly