]> www.average.org Git - pam_pcsc_cr.git/blob - authobj.h
systematize authobj errors
[pam_pcsc_cr.git] / authobj.h
1 #ifndef _AUTHOBJ_H
2 #define _AUTHOBJ_H
3
4 enum aobj_err {aoe_serial, aoe_size, aoe_crypt, aoe_data};
5
6 int make_challenge(const char *id, const char *pass, const char *nonce,
7                 unsigned char *challenge, int *challengesize);
8 int make_authobj(const char *id, const char *pass, const char *nonce,
9                 const unsigned char *secret, const int secsize,
10                 const unsigned char *payload, const int paysize,
11                 unsigned char *buffer, int *bufsize);
12 int parse_authobj(const unsigned char *key, const int keysize,
13                 const unsigned char *buffer, const int bufsize,
14                 unsigned char *secret, int *secsize,
15                 unsigned char *payload, int *paysize);
16
17 #endif