Mailing List Archive

HI£¬ALL£¡
Belows function (command.c).

Who can do me a favor providing the source code of crypt() ?

char *crypt (const char *, const char *);

thanks!!!

char *zencrypt (int libIndex, char *passwd)
{
char salt[6];
struct timeval tv;
char *crypt (const char *, const char *);

gettimeofday(&tv,0);

to64(&salt[0], random(), 3);
to64(&salt[3], tv.tv_usec, 3);
salt[5] = '\0';

return crypt (passwd, salt);
}