modified crypt.c