-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hash128 not matching python #8
Comments
There is a mismatch because the I could not tell you why it does this, but if you can’t find a Python implementation/binding that is accurate against the reference implementation you can simply swap the 64 bits around: >>> o = mmh3.hash128("I will not buy this tobacconist's, it is scratched.")
>>> hex(((o & 0xffffffffffffffff) << 64) + (o >> 64))
'0xd30654abbd8227e367d73523f0079673' Taking the (unwitting) test vectors from aappleby/smhasher#73 (comment):
|
Hi @karanlyons
I am not getting the hash128 of the this library to match the python mmh3.
Python mmh3:
hex(mmh3.hash128("I will not buy this tobacconist's, it is scratched.")))
Yields: 0x67d73523f0079673d30654abbd8227e3
But in your readme:
murmurHash3.x64.hash128("I will not buy this tobacconist's, it is scratched.");
Yields: d30654abbd8227e367d73523f0079673
Why is there a mismatch?
The text was updated successfully, but these errors were encountered: