Implementation of a stack in C with two types of protection for different data structures.
To specify the data type you are using, use
typedef *data_type* Elem;#define PROTECTION_LEVELThis define responsible for enabling/disabling protection:
- First bit of PROTECTION_LEVEL is 1 - enable canary protection
- First bit of PROTECTION_LEVEL is 0 - disable canary protection
- Second bit of PROTECTION_LEVEL is 1 - enable hash protection
- Second bit of PROTECTION_LEVEL is 0 - disable hash protection
Use
#define LOGS_TO_FILEIf you want to put logs to file with name
const char LOGSIf you want to put logs to console use
#define LOGS_TO_CONSOLE