Debian Codegraph @

include/crypto.h

raw
1 /*
2 * Copyright (c) 2005 Atheme Development Group
3 * Rights to this code are as documented under doc/LICENSE.
4 *
5 * Cryptographic module support.
6 *
7 */
8
9 #ifndef CRYPTO_H
10 #define CRYPTO_H
11
12 E const char *crypt_string(const char *key, const char *salt);
13 E const char *gen_salt(void);
14 E bool crypto_module_loaded;
15
16 typedef struct {
17 const char *id;
18 const char *(*crypt)(const char *key, const char *salt);
19 const char *(*salt)(void);
20 bool (*needs_param_upgrade)(const char *user_pass_string);
21
22 mowgli_node_t node;
23 } crypt_impl_t;
24
25 E void crypt_register(crypt_impl_t *impl);
26 E void crypt_unregister(crypt_impl_t *impl);
27 E const crypt_impl_t *crypt_verify_password(const char *user_input, const char *pass);
28 E const crypt_impl_t *crypt_get_default_provider(void);
29
30 #endif
31
32 /* vim:cinoptions=>s,e0,n0,f0,{0,}0,^0,=s,ps,t0,c3,+s,(2s,us,)20,*30,gs,hs
33 * vim:ts=8
34 * vim:sw=8
35 * vim:noexpandtab
36 */