diff --git a/files/out2.otp b/files/out2.otp new file mode 100644 index 0000000..577864c Binary files /dev/null and b/files/out2.otp differ diff --git a/files/test_files_dir.txt.otp b/files/test_files_dir.txt.otp new file mode 100644 index 0000000..211de8c Binary files /dev/null and b/files/test_files_dir.txt.otp differ diff --git a/otp.c b/otp.c index 49d7e4a..9e5361c 100644 --- a/otp.c +++ b/otp.c @@ -276,13 +276,13 @@ int command_line_mode(int argc, char* argv[]) { void show_main_menu(void) { printf("======================== Main Menu ========================\n"); - printf("\033[4mT\033[0mext encrypt\n"); - printf("\033[4mF\033[0mile encrypt\n"); - printf("\033[4mD\033[0mecrypt\n"); - printf("\033[4mG\033[0menerate new pad\n"); - printf("\033[4mL\033[0mist available pads\n"); - printf("\033[4mS\033[0mhow pad information\n"); - printf("E\033[4mx\033[0mit\n"); + printf(" \033[4mT\033[0mext encrypt\n"); + printf(" \033[4mF\033[0mile encrypt\n"); + printf(" \033[4mD\033[0mecrypt\n"); + printf(" \033[4mG\033[0menerate new pad\n"); + printf(" \033[4mL\033[0mist available pads\n"); + printf(" \033[4mS\033[0mhow pad information\n"); + printf(" E\033[4mx\033[0mit\n"); printf("\nSelect option: "); } @@ -336,8 +336,8 @@ int handle_encrypt_menu(void) { // Ask user to choose between text and file encryption printf("\nSelect encryption type:\n"); - printf("1. Text message\n"); - printf("2. File\n"); + printf(" 1. Text message\n"); + printf(" 2. File\n"); printf("Enter choice (1-2): "); char choice_input[10]; @@ -351,9 +351,9 @@ int handle_encrypt_menu(void) { if (choice == 1) { // Text encryption printf("\nPad selection options:\n"); - printf("1. Select from numbered list\n"); - printf("2. Enter checksum/prefix manually\n"); - printf("3. Browse pad files\n"); + printf(" 1. Select from numbered list\n"); + printf(" 2. Enter checksum/prefix manually\n"); + printf(" 3. Browse pad files\n"); printf("Enter choice (1-3): "); char pad_choice[10]; @@ -404,8 +404,8 @@ int handle_encrypt_menu(void) { else if (choice == 2) { // File encryption printf("\nFile selection options:\n"); - printf("1. Type file path directly\n"); - printf("2. Use file manager\n"); + printf(" 1. Type file path directly\n"); + printf(" 2. Use file manager\n"); printf("Enter choice (1-2): "); char file_choice[10]; @@ -453,8 +453,8 @@ int handle_encrypt_menu(void) { // Ask for output format printf("\nSelect output format:\n"); - printf("1. Binary (.otp) - preserves file permissions\n"); - printf("2. ASCII (.otp.asc) - text-safe format\n"); + printf(" 1. Binary (.otp) - preserves file permissions\n"); + printf(" 2. ASCII (.otp.asc) - text-safe format\n"); printf("Enter choice (1-2): "); char format_input[10]; @@ -500,8 +500,8 @@ int handle_decrypt_menu(void) { // Ask user to choose between text/message and file decryption printf("\nSelect decryption type:\n"); - printf("1. Text message (ASCII armored)\n"); - printf("2. File (.otp or .otp.asc)\n"); + printf(" 1. Text message (ASCII armored)\n"); + printf(" 2. File (.otp or .otp.asc)\n"); printf("Enter choice (1-2): "); char choice_input[10]; @@ -1196,8 +1196,8 @@ int encrypt_text(const char* pad_identifier, const char* input_text) { } else { // Get input text from user (interactive mode) printf("\nText input options:\n"); - printf("1. Type text directly\n"); - printf("2. Use text editor\n"); + printf(" 1. Type text directly\n"); + printf(" 2. Use text editor\n"); printf("Enter choice (1-2): "); char input_choice[10]; diff --git a/test_files_dir.txt b/test_files_dir.txt new file mode 100644 index 0000000..5bb2c01 --- /dev/null +++ b/test_files_dir.txt @@ -0,0 +1 @@ +Testing updated files directory functionality