by rollulus · 2y ago · 0 comments
[1]: https://en.m.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93...
Hash Name, Bandwidth, Small Velocity, Quality, Comment
XXH3 (SSE2), 31.5 GB/s, 133.1, 10,
FNV64, 1.2 GB/s, 62.7, 5, Poor avalanche properties
[0]: https://github.com/Cyan4973/xxHash
Also ETag is exactly the kind of thing non-cryptographic hashes are meant for, but if you can't convince them Blake3 is a very fast modern cryptographic hash function.
If you're implementing weak validation, then you might need to preprocess the payload before running it through the hash function. For example, if your payload is JSON and you want to make it format-agnostic, then you'll need to normalize the payload and then compute the hash.
In either case, the hashing algo probably doesn't matter as much.