crta.jpg (1577 bytes)

Hash functions test data

Main intention and good quality of a hash function is its ability to distribute well the input data over the hash table.

When comes to testing of program using hash table it is not the problem to test with well distributed data. The problem is to test collisions under controlled circumstances.

We provide test data - sets of ASCII strings with the same hash value. Test data can be used in unit test or in robustness test where the program can be feed with several millions of collisions.

The hash functions we provide data for are described on the "Eternally Confuzzled - The Art of Hashing" web page.

The following hash functions are supported:

Hash function Code Supported
Rotating hash vrt yes
Bernstein hash bern yes
Modified Bernstein sbern yes
Shift-Add-XOR hash sax yes
FNV hash fnv yes
One-at-a-Time hash oat yes
JSW hash jsw yes
ELF hash elf no (ask)
Jenkins hash jen no

Here is a sample set of strings with the same jsw hash value, 0xbacabeee:


The prefixes, "/space/quote-a/1/"... are taken from the file. The second prefix "z_" also includes the unique identification of the string. The hash value, 0xbacabeee, is included into the string in hex form, i.e. surrounded by characters "h". The hash value can be included in decimal form (surrounded by character "d"):


or not at all:


Prefixes can be excluded too:


Up to ten millions strings with the same hash value (of the supported hash function) can be provided on request. Ask for price list.


This is the proof that above mentioned hash functions are not cryptographically safe. Hashes are actually broken by generating millions of test data with the same hash value.

If you use hashes as "unique" identification of certain data in your program (like file names, user names, user passwords,...), test data can help you see how your application can be broken. Use hash test data and improve your software!

Back   Top

         Software dev.
         Software solutions
            Laser scanners
            Circular arcs
            RST/ISP Control
            CO2 frequency
            Hash test data
            D/A converter
            Solar hot water
            HPGL file area
            Pump shapes
crta.jpg (2842 bytes)
kvadratki.gif (5422 bytes)kvadratki.gif (5422 bytes)  

(c) ZAMISEL d.o.o.