Lines Matching refs:salt
114 static char *getalgfromsalt(const char *salt);
119 static char *_unix_crypt(const char *pw, const char *salt, char *iobuf);
144 crypt(const char *plaintext, const char *salt) in crypt() argument
163 if (salt == NULL || salt[0] != '$' || strlen(salt) == 1) { in crypt()
164 return (_unix_crypt(plaintext, salt, ctbuffer)); in crypt()
176 if ((algname = getalgfromsalt(salt)) == NULL) { in crypt()
188 ciphertext = _unix_crypt(plaintext, salt, ctbuffer); in crypt()
191 plaintext, salt, (const char **)alg->a_params); in crypt()
282 getalgfromsalt(const char *salt) in getalgfromsalt() argument
288 if (salt == NULL || strlen(salt) > CRYPT_MAXCIPHERTEXTLEN) in getalgfromsalt()
298 if (salt[0] != '$') { in getalgfromsalt()
304 while (salt[i] != '\0' && salt[i] != '$' && salt[i] != ',') { in getalgfromsalt()
305 algname[j] = salt[i]; in getalgfromsalt()
1061 _unix_crypt(const char *pw, const char *salt, char *iobuf) in _unix_crypt() argument
1090 c = *salt++; in _unix_crypt()