Lib Sub-System: Hash |
01 | With these helper functions it is possible to create hash values of arbitrary data. The generated hash values can be either of 32bit or 64bit depth. |
02 |
Although it is called a 'hash' the actual algorithms used are ones for CRC
calculation. Also, the 64bit hash values are in fact two different 32bit
CRC values combined. |
03 | The hash generator functions may also be used for the collection classes from STL that require such values. |
04 |
The data used for hash value generation has to be chosen carefully if the
value is to be transferred across host boundaries. Only properly serialized
data (using the coder functions) may be used for such applications. Generating a hash value from a simple integer value will cause problems, if the same integer's hash value is compared between big-endian and little-endian machines. |
05 |
When hashing strings alone without their size as an integer, it is also
recommended to include their terminating 0x00 character. Otherwise, with two consecutive strings, there would be no difference between ("ab" + "cd") and ("a" + "bcd") for example. |
06 | Functions: |
07 |
Reference: SemysHash.h Implementation: Semys Library |
Goto: Main Page; This page is part of the Semys software documentation. See About: Documentation for details. |