Lines Matching refs:passwd
49 char *passwd, BIO *out, int quiet, int table,
96 char *infile = NULL, *salt = NULL, *passwd = NULL, **passwds = NULL; in passwd_main() local
226 passwd = passwd_malloc = in passwd_main()
261 passwd = *passwds++; in passwd_main()
262 if (!do_passwd(passed_salt, &salt, &salt_malloc, passwd, bio_out, in passwd_main()
270 assert(passwd != NULL); in passwd_main()
272 int r = BIO_gets(in, passwd, pw_maxlen + 1); in passwd_main()
274 char *c = (strchr(passwd, '\n')); in passwd_main()
286 (passed_salt, &salt, &salt_malloc, passwd, bio_out, quiet, in passwd_main()
314 static char *md5crypt(const char *passwd, const char *magic, const char *salt) in md5crypt() argument
328 passwd_len = strlen(passwd); in md5crypt()
346 ascii_passwd = OPENSSL_strdup(passwd); in md5crypt()
350 passwd = ascii_passwd; in md5crypt()
377 || !EVP_DigestUpdate(md, passwd, passwd_len)) in md5crypt()
392 || !EVP_DigestUpdate(md2, passwd, passwd_len) in md5crypt()
394 || !EVP_DigestUpdate(md2, passwd, passwd_len) in md5crypt()
407 if (!EVP_DigestUpdate(md, (n & 1) ? "\0" : passwd, 1)) in md5crypt()
418 (i & 1) ? (const unsigned char *)passwd : buf, in md5crypt()
426 if (!EVP_DigestUpdate(md2, passwd, passwd_len)) in md5crypt()
430 (i & 1) ? buf : (const unsigned char *)passwd, in md5crypt()
495 static char *shacrypt(const char *passwd, const char *magic, const char *salt) in shacrypt() argument
526 passwd_len = strlen(passwd); in shacrypt()
578 ascii_passwd = OPENSSL_strdup(passwd); in shacrypt()
582 passwd = ascii_passwd; in shacrypt()
610 || !EVP_DigestUpdate(md, passwd, passwd_len) in shacrypt()
617 || !EVP_DigestUpdate(md2, passwd, passwd_len) in shacrypt()
619 || !EVP_DigestUpdate(md2, passwd, passwd_len) in shacrypt()
633 (n & 1) ? buf : (const unsigned char *)passwd, in shacrypt()
646 if (!EVP_DigestUpdate(md2, passwd, passwd_len)) in shacrypt()
777 char *passwd, BIO *out, int quiet, int table, in do_passwd() argument
815 if ((strlen(passwd) > pw_maxlen)) { in do_passwd()
823 passwd[pw_maxlen] = 0; in do_passwd()
825 assert(strlen(passwd) <= pw_maxlen); in do_passwd()
829 hash = md5crypt(passwd, (mode == passwd_md5 ? "1" : "apr1"), *salt_p); in do_passwd()
831 hash = md5crypt(passwd, "", *salt_p); in do_passwd()
833 hash = shacrypt(passwd, (mode == passwd_sha256 ? "5" : "6"), *salt_p); in do_passwd()
837 BIO_printf(out, "%s\t%s\n", passwd, hash); in do_passwd()
839 BIO_printf(out, "%s\t%s\n", hash, passwd); in do_passwd()