cespare / xxhash

A Go implementation of the 64-bit xxHash algorithm (XXH64)
MIT License
1.79k stars 123 forks source link

Add initial support for custom seeds #77

Closed cespare closed 6 months ago

cespare commented 6 months ago

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.