4.4BSD/usr/src/contrib/xns/examples/auth/hashpass.c

Compare this file to the similar file:
Show the results in this format:

#include <ctype.h>

unsigned short
hashpass(hpw)
	char *hpw;
{
	long hash;
	register char c;

	hash = 0;
	while ((c = *hpw++) != '\0') {
		hash = (hash*65536) + (isupper(c) ? tolower(c) : c);
		hash %= 65357;
	}
	return((unsigned short) hash);
}