Non-Cryptographic Hashes

Started by JTaylor, April 24, 2024, 08:16:18 PM

Previous topic - Next topic

JTaylor

Does the Functions like FileDigest() and BinaryHashRec() do the following or would this be a useful Extender Function?

Jim

Identical across all platforms (little / big endian). The library includes the following algorithms :

    XXH32 : generates 32-bit hashes, using 32-bit arithmetic
    XXH64 : generates 64-bit hashes, using 64-bit arithmetic
    XXH3 (since v0.8.0): generates 64 or 128-bit hashes, using vectorized arithmetic. The 128-bit variant is called XXH128.

All variants successfully complete the SMHasher test suite which evaluates the quality of hash functions (collision, dispersion and randomness).

td

FileDigest does not use proprietary hash algorithms. The function documentation lists* the algorithms including several SHA-2 cryptographic hash algorithms designed by the United States National Security Agency (NSA).

Unlike the WinBatch download page**, many Websites list several hashes for each file you download. You may have noticed that those listed hashes parallel hashes supported by FileDigest. That is not a coincidence.

The BinaryHashRec function is used to create hash tables in binary buffers. The hash algorithm it uses is a commonly used hash table algorithm that balances performance and collision avoidance. The hash algorithm is fine for the intended purpose.

*There is runaway bold text in the algorithm parameter of the FileDigest function in the Consolidated Wil Help file documentation for the function. It should get fixed.

**Adding hashes to the download page has been on the to-do list for a long time. This post is another reminder that it needs to get done.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade