File:  [CSRG BSD Unix] / 43BSD / contrib / xns / examples / authchtest / hashpass.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

#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);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.