The first algorithm let us call the RCS hashing scheme, since it is
one used in the Revision Control System, a Unix programming package,
for keeping track of source code and its revisions.
The RCS hashing scheme works only for short, less than 17 characters,
ASCII strings.
The RCS scheme can be written:
So it is important to understand the output of a hash function in terms
of the input.
For RCS Hash, although it is fast the base hash value (the one used before
the mod operation) is limited in value by the number of characters in the
key.
Until you have keys that have 16 characters in them,
you do not get 31-bit hash values.
In fact using this hash function for small words (under 5-chars)
the base hash value never exceeds 16-bits.
As another example of how Pascal could be translated into Hermes machine
code, here is the Hermes Assembly Language version of RCS Hash.