Closed ycombinator closed 4 years ago
This PR adds a constructor that returns the hash.Hash interface so that this xxhash implementation may be used interchangeably with other hash.Hash implementations, such as in the https://github.com/elastic/beats project (see https://www.elastic.co/guide/en/beats/filebeat/master/fingerprint.html).
hash.Hash
It leaves the existing New constructor as-is for backwards compatibility.
New
Note that the signature was intentionally changed as part of moving to v2 of this package (see #13).
I'd rather not add this trivial wrapper. It's easy enough to put that in the client code.
This PR adds a constructor that returns the
hash.Hash
interface so that this xxhash implementation may be used interchangeably with otherhash.Hash
implementations, such as in the https://github.com/elastic/beats project (see https://www.elastic.co/guide/en/beats/filebeat/master/fingerprint.html).It leaves the existing
New
constructor as-is for backwards compatibility.