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()
88 strlcpy(salt, passwd, MIN(typelen, sizeof(salt))); in pick_salt()
95 return salt; in pick_salt()
99 xcrypt(const char *password, const char *salt) in xcrypt() argument
107 if (salt == NULL) in xcrypt()
108 salt = pick_salt(); in xcrypt()
111 if (is_md5_salt(salt)) in xcrypt()
112 crypted = md5_crypt(password, salt); in xcrypt()
114 crypted = crypt(password, salt); in xcrypt()
117 crypted = bigcrypt(password, salt); in xcrypt()
119 crypted = crypt(password, salt); in xcrypt()
121 crypted = bigcrypt(password, salt); in xcrypt()
123 crypted = crypt(password, salt); in xcrypt()