Lines Matching refs:salt
78 static char salt[32]; in pick_salt() local
80 if (salt[0] != '\0') in pick_salt()
81 return salt; in pick_salt()
82 strlcpy(salt, "xx", sizeof(salt)); in pick_salt()
89 strlcpy(salt, passwd, MIN(typelen, sizeof(salt))); in pick_salt()
96 return salt; in pick_salt()
100 xcrypt(const char *password, const char *salt) in xcrypt() argument
108 if (salt == NULL) in xcrypt()
109 salt = pick_salt(); in xcrypt()
112 if (is_md5_salt(salt)) in xcrypt()
113 crypted = md5_crypt(password, salt); in xcrypt()
115 crypted = crypt(password, salt); in xcrypt()
118 crypted = bigcrypt(password, salt); in xcrypt()
120 crypted = crypt(password, salt); in xcrypt()
122 crypted = bigcrypt(password, salt); in xcrypt()
124 crypted = crypt(password, salt); in xcrypt()