3 * Routines to encrypt ID's
10 /* Function Name: RemoveHyphens
11 * Description: Removes all hyphens from the string passed to it.
12 * Arguments: str - the string to remove the hyphes from
22 while ((hyphen = index(str, '-')) != (char *)0)
23 (void) strcpy(hyphen, hyphen + 1);
27 /* Function Name: EncryptMITID
28 * Description: Encrypts an mit ID number.
29 * Arguments: sbuf - the buffer to return the encrypted number in.
30 * idnumber - the id number (string).
31 * first, last - name of the person.
36 EncryptID(sbuf, idnumber, first, last)
37 char *sbuf, *idnumber, *first, *last;
42 RemoveHyphens(idnumber);
43 salt[0] = tolower(last[0]);
44 salt[1] = tolower(first[0]);
47 (void) strcpy(sbuf, crypt(&idnumber[2], salt));