// common.h --- shared between client and server // // Copyright (c) 2026 Martin Michalec // // SPDX-License-Identifier: MIT // // Commentary: // // Code: #ifndef INCLUDED_COMMON_H #define INCLUDED_COMMON_H #include "stdint.h" #include "crypto.h" struct packet { uint8_t size; uint8_t data[]; }; #define MAX_PACKET_SIZE (256 - sizeof (struct packet)) #define MAX_MESSAGE_LENGTH 80 struct message { char length; char data[MAX_MESSAGE_LENGTH]; }; enum key_kind { KK_NONE, KK_PSK, KK_DHKX, }; bool load_aes_256_key (aes_256_key, const char *filename); void print_hex (uint8_t *data, size_t size); #endif // INCLUDED_COMMON_H // common.h ends here