8 static void to64(char *s, unsigned long v, int n)
10 static unsigned char itoa64[] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
12 *s++ = itoa64[v&0x3f];
17 static char *htenc(const char *clearpasswd) {
20 (void) srand((int) time((time_t *) NULL));
21 to64(&salt[0], rand(), 8);
23 res = crypt(clearpasswd, salt);
29 printf("Orig: |%s| \n", orig);
30 char *enc = htenc(orig);
31 printf("Enc: |%s| \n", enc);