Lines Matching refs:passwd
49 char *passwd, BIO *out, int quiet, int table,
96 char *infile = NULL, *salt = NULL, *passwd = NULL, **passwds = NULL;
226 passwd = passwd_malloc =
261 passwd = *passwds++;
262 if (!do_passwd(passed_salt, &salt, &salt_malloc, passwd, bio_out,
270 assert(passwd != NULL);
272 int r = BIO_gets(in, passwd, pw_maxlen + 1);
274 char *c = (strchr(passwd, '\n'));
286 (passed_salt, &salt, &salt_malloc, passwd, bio_out, quiet,
314 static char *md5crypt(const char *passwd, const char *magic, const char *salt)
328 passwd_len = strlen(passwd);
346 ascii_passwd = OPENSSL_strdup(passwd);
350 passwd = ascii_passwd;
378 || !EVP_DigestUpdate(md, passwd, passwd_len))
393 || !EVP_DigestUpdate(md2, passwd, passwd_len)
395 || !EVP_DigestUpdate(md2, passwd, passwd_len)
408 if (!EVP_DigestUpdate(md, (n & 1) ? "\0" : passwd, 1))
419 (i & 1) ? (const unsigned char *)passwd : buf,
427 if (!EVP_DigestUpdate(md2, passwd, passwd_len))
431 (i & 1) ? buf : (const unsigned char *)passwd,
496 static char *shacrypt(const char *passwd, const char *magic, const char *salt)
527 passwd_len = strlen(passwd);
579 ascii_passwd = OPENSSL_strdup(passwd);
583 passwd = ascii_passwd;
610 || !EVP_DigestUpdate(md, passwd, passwd_len)
617 || !EVP_DigestUpdate(md2, passwd, passwd_len)
619 || !EVP_DigestUpdate(md2, passwd, passwd_len)
633 (n & 1) ? buf : (const unsigned char *)passwd,
646 if (!EVP_DigestUpdate(md2, passwd, passwd_len))
778 char *passwd, BIO *out, int quiet, int table,
816 if ((strlen(passwd) > pw_maxlen)) {
824 passwd[pw_maxlen] = 0;
826 assert(strlen(passwd) <= pw_maxlen);
830 hash = md5crypt(passwd, (mode == passwd_md5 ? "1" : "apr1"), *salt_p);
832 hash = md5crypt(passwd, "", *salt_p);
834 hash = shacrypt(passwd, (mode == passwd_sha256 ? "5" : "6"), *salt_p);
838 BIO_printf(out, "%s\t%s\n", passwd, hash);
840 BIO_printf(out, "%s\t%s\n", hash, passwd);