2 * This file contains routines modified from OpenBSD. Parts are contributed
3 * by Todd Miller <millert@openbsd.org>, Theo De Raadt <deraadt@openbsd.org>
16 * Returns: 1 user doesnt exist, -1 file error, 0 user exists.
25 return opielookup(&opie, username);
31 * Returns the current sequence number and
32 * seed for the passed user.
36 opie_keyinfo(username)
40 static char str[OPIE_CHALLENGE_MAX];
43 i = opiechallenge(&opie, username, str);
53 * Check to see if answer is the correct one to the current
56 * Returns: 0 success, -1 failure
60 opie_passverify(username, passwd)
67 i = opielookup(&opie, username);
68 if (i == -1 || i == 1)
71 if (opieverify(&opie, passwd) == 0)
77 #define OPIE_HASH_DEFAULT 1
79 /* Current hash type (index into opie_hash_types array) */
80 static int opie_hash_type = OPIE_HASH_DEFAULT;
82 struct opie_algorithm_table {
86 static struct opie_algorithm_table opie_algorithm_table[] = {
90 /* Get current hash type */
94 return(opie_algorithm_table[opie_hash_type].name);