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

Add initial support for custom seeds #77

Merged
merged 1 commit into from
Apr 4, 2024
Merged

Add initial support for custom seeds #77

merged 1 commit into from
Apr 4, 2024

Conversation

cespare
Copy link
Owner

@cespare cespare commented Apr 4, 2024

This adds support for custom seeds when using a Digest (but not to the one-shot functions Sum64 and Sum64String).

The seed is not stored in the digest itself -- every Reset uses a zero seed and (Un)MarshalBinary is unchanged. This is simpler for backward compatibility but may be something to reconsider if we rework the API for a v3.

@cespare cespare requested a review from dmac April 4, 2024 18:58
Copy link
Collaborator

@dmac dmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spot checked the Reset implementation against the reference source. I just have one question about some preexisting code.

@cespare cespare requested a review from dmac April 4, 2024 19:35
This adds support for custom seeds when using a Digest (but not to the
one-shot functions Sum64 and Sum64String).

The seed is not stored in the digest itself -- every Reset uses a zero
seed and (Un)MarshalBinary is unchanged. This is simpler for backward
compatibility but may be something to reconsider if we rework the API
for a v3.
@cespare cespare merged commit 998dce2 into main Apr 4, 2024
12 checks passed
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

Successfully merging this pull request may close these issues.

2 participants