Upon further review, VERSION isn't even used in libmagic.3.
[dragonfly.git] / lib / libskey / skey.h
blobe67d6f281a138f4162e328eac3fa7e9dbeb9ae94
1 /*
2 * $DragonFly: src/lib/libskey/skey.h,v 1.3 2003/11/12 20:21:31 eirikn Exp $
3 */
5 #ifndef _SKEY_H_
6 #define _SKEY_H_
8 #include <sys/cdefs.h>
10 /* Server-side data structure for reading keys file during login */
11 struct skey {
12 FILE *keyfile;
13 char buf[256];
14 char *logname;
15 int n;
16 char *seed;
17 char *val;
18 long recstart; /*needed so reread of buffer is efficient*/
21 #ifdef _SKEY_INTERNAL
22 /* Client-side structure for scanning data stream for challenge */
23 struct mc {
24 char buf[256];
25 int skip;
26 int cnt;
29 #define atob8 _sk_atob8
30 #define btoa8 _sk_btoa8
31 #define btoe _sk_btoe
32 #define etob _sk_etob
33 #define f _sk_f
34 #define htoi _sk_htoi
35 #define keycrunch _sk_keycrunch
36 #define put8 _sk_put8
37 #define readpass _sk_readpass
38 #define rip _sk_rip
39 #define sevenbit _sk_sevenbit
41 void f (char *x);
42 int keycrunch (char *result,const char *seed,const char *passwd);
43 char *btoe (char *engout,char *c);
44 char *put8 (char *out,char *s);
45 int atob8 (char *out, char *in);
46 int btoa8 (char *out, char *in);
47 int htoi (char c);
48 int etob (char *out,char *e);
49 void sevenbit (char *s);
50 char *readpass (char *buf, int n);
51 void rip (char *buf);
52 #endif /* _SKEY_INTERNAL */
54 /* Simplified application programming interface. */
55 #include <pwd.h>
56 int skeylookup (struct skey *mp, const char *name);
57 int skeyverify (struct skey *mp, char *response);
58 int skeychallenge (struct skey *mp, const char *name, char *challenge);
59 int skeyinfo (struct skey *mp, const char* name, char *ss);
60 int skeyaccess (char *user, const char *port, const char *host, const char *addr);
61 char *skey_getpass (const char *prompt, struct passwd * pwd, int pwok);
62 const char *skey_crypt (char *pp, char *salt, struct passwd *pwd, int pwok);
64 #endif /* _SKEY_H_ */