diff --git a/src/crypto.c b/src/crypto.c index fbdcd07..fe9f83c 100644 --- a/src/crypto.c +++ b/src/crypto.c @@ -5,7 +5,7 @@ #include #include #include -#include "otp.h" +#include "main.h" #define PROGRESS_UPDATE_INTERVAL (64 * 1024 * 1024) // 64MB intervals diff --git a/src/entropy.c b/src/entropy.c index 2462f70..4c2248d 100644 --- a/src/entropy.c +++ b/src/entropy.c @@ -16,7 +16,7 @@ #include #include #include "nostr_chacha20.h" -#include "otp.h" +#include "main.h" // In-place pad entropy addition using Chacha20 or direct XOR diff --git a/src/main.c b/src/main.c index 95af937..265be32 100644 --- a/src/main.c +++ b/src/main.c @@ -15,7 +15,7 @@ #include #include #include -#include "otp.h" +#include "main.h" int main(int argc, char* argv[]) { // Initialize terminal dimensions first diff --git a/src/otp.h b/src/main.h similarity index 98% rename from src/otp.h rename to src/main.h index 4ec19ef..aa68afc 100644 --- a/src/otp.h +++ b/src/main.h @@ -1,12 +1,12 @@ -#ifndef OTP_H -#define OTP_H +#ifndef MAIN_H +#define MAIN_H //////////////////////////////////////////////////////////////////////////////// -// OTP CIPHER - FUNCTION PROTOTYPES HEADER +// OTP CIPHER - MAIN HEADER FILE // One Time Pad Implementation v0.2.109 -// -// This header file contains all function prototypes extracted from otp.c -// Organized by functional categories for better maintainability +// +// This header file contains all function prototypes and type definitions +// for the OTP Cipher project //////////////////////////////////////////////////////////////////////////////// #include @@ -335,4 +335,4 @@ char* select_pad_interactive(const char* title, const char* prompt, pad_filter_t // Help and usage display void print_usage(const char* program_name); -#endif // OTP_H \ No newline at end of file +#endif // MAIN_H \ No newline at end of file diff --git a/src/otp.c b/src/otp.c deleted file mode 100644 index aba19f5..0000000 --- a/src/otp.c +++ /dev/null @@ -1,35 +0,0 @@ -#define _POSIX_C_SOURCE 200809L -#define _DEFAULT_SOURCE - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "nostr_chacha20.h" -#include "otp.h" - - -#define MAX_INPUT_SIZE 4096 -#define MAX_LINE_LENGTH 1024 -#define MAX_HASH_LENGTH 65 -#define PROGRESS_UPDATE_INTERVAL (64 * 1024 * 1024) // 64MB intervals -#define DEFAULT_PADS_DIR "pads" -#define FILES_DIR "files" - -//////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////// -// GLOBAL VARIABLES -/////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////////////// - -char current_pads_dir[512] = DEFAULT_PADS_DIR; diff --git a/src/pads.c b/src/pads.c index d8ce78d..216dc67 100644 --- a/src/pads.c +++ b/src/pads.c @@ -16,7 +16,7 @@ #include #include #include -#include "otp.h" +#include "main.h" // Extracted pad management functions from otp.c diff --git a/src/state.c b/src/state.c index b46494f..3adb54d 100644 --- a/src/state.c +++ b/src/state.c @@ -1,6 +1,6 @@ #include #include -#include "otp.h" +#include "main.h" // Global state variables static char current_pads_dir[512] = DEFAULT_PADS_DIR; diff --git a/src/trng.c b/src/trng.c index c5e28f9..1967908 100644 --- a/src/trng.c +++ b/src/trng.c @@ -17,7 +17,7 @@ #include #include #include "nostr_chacha20.h" -#include "otp.h" +#include "main.h" // Basic TrueRNG entropy collection function int collect_truerng_entropy(unsigned char* entropy_buffer, size_t target_bytes, size_t* collected_bytes, int display_progress) { diff --git a/src/ui.c b/src/ui.c index df2779f..5e1219f 100644 --- a/src/ui.c +++ b/src/ui.c @@ -15,7 +15,7 @@ #include #include #include -#include "otp.h" +#include "main.h" // Initialize terminal dimensions void init_terminal_dimensions(void) { diff --git a/src/util.c b/src/util.c index 173d25e..2c35cfe 100644 --- a/src/util.c +++ b/src/util.c @@ -15,7 +15,7 @@ #include #include #include -#include "otp.h" +#include "main.h" // Global variables for preferences static char default_pad_path[1024] = "";