Lines Matching full:salt
1 /* mkpasswd.c - encrypt the given passwd using salt
14 usage: mkpasswd [-P FD] [-m TYPE] [-S SALT] [PASSWORD] [SALT]
20 -S SALT
29 char *salt;
34 char salt[MAX_SALT_LEN] = {0,};
39 if (TT.salt) error_exit("duplicate salt");
40 TT.salt = toys.optargs[1];
43 if (-1 == (i = get_salt(salt, TT.method))) error_exit("bad -m");
44 if (TT.salt) {
45 char *s = TT.salt;
49 if (*s) error_exit("salt not in [./A-Za-z0-9]");
51 snprintf(salt+i, sizeof(salt)-i, "%s", TT.salt);
76 xprintf("%s\n",crypt(*toys.optargs ? *toys.optargs : toybuf, salt));