Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Quick And Responsive Test Suite For Analyzing C++ Hash Functions

responsive quick test suite to analyze hash functions

There is no such thing as a good hash function for universal hashes. Depending on the context different criteria determine the quality of a hash. To test your hash function using data drawn from the same distribution that you expect it works on. When looking at a hash function on 64-bit longs, the default hash function is excellent if the input values are drawn uniformly from all possible long values.

There are different ways to test the distribution, collision, and performance properties of non-cryptographic hash functions. The probability is not a good idea when it comes to hash collisions or distribution. For this, several libraries utilize linear cryptoanalysis or other methods.

The SMHasher is a test suite designed to test the distribution, collision, and performance properties of the non-cryptographic hash function. It aims to be the DieHarder of hash testing and does a pretty good job of finding flaws with several popular hashes.

[crayon-66355e4ce8c4a056262317/]

Be sure to head over and check out the SMHasher test suite on the GetIt portal and download it in the IDE!

Exit mobile version