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

Option for seed value? #35

Closed
benjamin-bader opened this issue Dec 26, 2019 · 2 comments
Closed

Option for seed value? #35

benjamin-bader opened this issue Dec 26, 2019 · 2 comments

Comments

@benjamin-bader
Copy link

Hi there,

I notice that in the canonical C implementation, as well as in most libraries that wrap it, x32 and x64 digests accept a "seed" value. Have you given any thought to including one in your Digest API?

I personally would find it nice; my use case here is ensuring consistent digests across platforms and languages, and while I can do so today, it's at the expense of making every other platform a little more complicated (by adding a manual few "seed" bytes to the start of each digest, for example).

TL;DR:
In most xxhash libs I've seen so far, I can do something like d.Reset(seed). It'd be nice if this library allowed that option, too. Would you be open to this kind of change?

@benjamin-bader
Copy link
Author

On further thought, this seems like a poor fit for the current API as implemented.

@cespare
Copy link
Owner

cespare commented Apr 4, 2024

I decided to add API for this in #77.

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