#ifndef ECDAA_COMMON_H #define ECDAA_COMMON_H #include #include #include #include #define ISSUERPORT 6590 #define MEMBERPORT 6591 #define VERIFIERPORT 6592 #define MAX_CLIENTS 10 #define MAX_MSGSIZE 15360 #define MAX_CHKSUMSIZE 1024 #define MAX_BUFSIZE (((MAX_MSGSIZE + 2) / 3) * 4) + (((MAX_CHKSUMSIZE + 2) / 3) * 4) + 1536 /* #define MAX_MSGSIZE ((MAX_BUFSIZE - 1536) / 2) - MAX_CHKSUMSIZE //for bin to hex*/ /* #define MAX_MSGSIZE ((MAX_BUFSIZE - 1536) / 4 * 3) - MAX_CHKSUMSIZE //for base64 */ #define MAX_BSNSIZE 128 #define NONCE_SIZE 384 #define MSGFILE "msg.txt" #define CHKSUMFILE "chksum.txt" typedef int (*conn_handler)(char *buffer); void ecdaa_rand(void *buffer, size_t buflen); size_t ecdaa_decode(const char *in_enc, uint8_t *out_dec, size_t outlen); size_t ecdaa_encode(const uint8_t *in_dec, char *out_enc, size_t inlen); #endif //ECDAA_COMMON_H