evo-crypter
 
Loading...
Searching...
No Matches
mod.h File Reference

Defines the configuration structure and functions for evo-crypter. More...

#include <ctype.h>
#include <setjmp.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Classes

struct  Config
 Represents the program's configuration settings. More...
 

Functions

Config initialize_config (int argc, char *argv[])
 Initializes the configuration, validates it, and sets default values.
 
void free_config (Config *config)
 Frees the dynamically allocated memory in the Config struct.
 

Detailed Description

Defines the configuration structure and functions for evo-crypter.

Function Documentation

◆ free_config()

void free_config ( Config config)

Frees the dynamically allocated memory in the Config struct.

This function should be called when the Config struct is no longer needed to prevent memory leaks.

Parameters
configA pointer to the Config struct to be freed.

◆ initialize_config()

Config initialize_config ( int  argc,
char *  argv[] 
)

Initializes the configuration, validates it, and sets default values.

This function takes the preliminary Config object created by parse_command_line_args, performs validation checks, sets default values for unspecified options, and ensures that the configuration is consistent and ready for use.

Parameters
argcThe number of command-line arguments.
argvAn array of strings containing the command-line arguments.
Returns
A fully initialized and validated Config struct. The error field will be set to true if any errors are encountered.