<P> In cryptographic hash functions, a Merkle--Damgård construction is usually used . In general, the scheme for hashing such data is to break the input into a sequence of small units (bits, bytes, words, etc .) and combine all the units b (1), b (2),..., b (m) sequentially, as follows </P> <P> This schema is also used in many text checksum and fingerprint algorithms . The state variable S may be a 32 - or 64 - bit unsigned integer; in that case, S0 can be 0, and G (S, n) can be just S mod n . The best choice of F is a complex issue and depends on the nature of the data . If the units b (k) are single bits, then F (S, b) could be, for instance </P> <P> Here highbit (S) denotes the most significant bit of S; the' *' operator denotes unsigned integer multiplication with lost overflow;' ^' is the bitwise exclusive or operation applied to words; and P is a suitable fixed word . </P> <P> In many cases, one can design a special - purpose (heuristic) hash function that yields many fewer collisions than a good general - purpose hash function . For example, suppose that the input data are file names such as FILE0000. CHK, FILE0001. CHK, FILE0002. CHK, etc., with mostly sequential numbers . For such data, a function that extracts the numeric part k of the file name and returns k mod n would be nearly optimal . Needless to say, a function that is exceptionally good for a specific kind of data may have dismal performance on data with different distribution . </P>

This is the term for the method used to create a formula