password-scheme.h revision 794ac3e4a22caba0297a1333b43e6bd47fc50b91
#ifndef __PASSWORD_SCHEME_H
#define __PASSWORD_SCHEME_H
struct password_scheme {
const char *name;
const char *user);
const char *(*password_generate)(const char *plaintext,
const char *user);
};
/* Returns 1 = matched, 0 = didn't match, -1 = unknown scheme */
/* Extracts scheme from password, or returns NULL if it isn't found. */
const char *password_get_scheme(const char **password);
/* Create wanted password scheme out of plaintext password and username. */
const char *scheme);
/* Iterate through the list of password schemes, returning names */
void password_schemes_init(void);
void password_schemes_deinit(void);
/* INTERNAL: */
const char *password_generate_cram_md5(const char *pw);
#endif