2 * This file contains routines modified from OpenBSD. Parts are contributed
3 * by Todd Miller <millert@openbsd.org>, Theo De Raadt <deraadt@openbsd.org>
15 * Returns: 1 user doesnt exist, -1 file error, 0 user exists.
24 return opielookup(&opie, username);
30 * Returns the current sequence number and
31 * seed for the passed user.
35 opie_keyinfo(username)
39 static char str[OPIE_CHALLENGE_MAX];
42 i = opiechallenge(&opie, username, str);
52 * Check to see if answer is the correct one to the current
55 * Returns: 0 success, -1 failure
59 opie_passverify(username, passwd)
66 i = opielookup(&opie, username);
67 if (i == -1 || i == 1)
70 if (opieverify(&opie, passwd) == 0)
76 #define OPIE_HASH_DEFAULT 1
78 /* Current hash type (index into opie_hash_types array) */
79 static int opie_hash_type = OPIE_HASH_DEFAULT;
81 struct opie_algorithm_table {
85 static struct opie_algorithm_table opie_algorithm_table[] = {
89 /* Get current hash type */
93 return(opie_algorithm_table[opie_hash_type].name);