/*
 *  Hash1.Cpp
 *
 *  03.06.1998, implemented by Michael Neumann
 */

int hash1(int M, char* t)
{
    unsigned h=0;
    for(;*t;++t) h = ((h << 8)+ *t) % M;
    return h;
}