Skip to content
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

Chained hashing not working as expected #16

Closed
blackcoffeerider opened this issue Aug 19, 2018 · 1 comment
Closed

Chained hashing not working as expected #16

blackcoffeerider opened this issue Aug 19, 2018 · 1 comment

Comments

@blackcoffeerider
Copy link

Hello Hajime,

I guess i am doing something wrong - so this is probably not a real issue.
I am trying to hash big files an reading them in chunks for obvious reasons.
As a test i ran the following:

>>> mmh3.hash128('foobar', 0, signed = True)
155033341411922636178181560508455868997
>>> mmh3.hash128('bar',mmh3.hash128('foo', 0,signed = True), signed = True)
144772797738558108830387305245635675932

I expected the hash to be the same in both cases.
Am I missinterpreting the seed value - or is there another way of chaining hashes in murmur in general?

Thanks & Regards,

Martin

@hajimes
Copy link
Owner

hajimes commented Mar 25, 2023

Hi Martin,

Sorry for the huge delay in my answer. A seed is there to be used for randomizing the hash function.
The following Stack Overflow article is informative.
https://stackoverflow.com/questions/9241230/what-is-murmurhash3-seed-parameter

As to incrementally feeding chunks of large data, I plan to implement hashlib-compliant interfaces in the next update. (#39)

Thanks,

@hajimes hajimes closed this as completed Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants