From d540c1ea8867da55dbc0c3f09c02430636e566a6 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Wed, 24 Jan 2024 15:08:37 +0100 Subject: [PATCH] removed tkch_version from tkch_gen parameters, using flags instead --- include/misc.h | 2 +- src/core/lib/utils/misc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/misc.h b/include/misc.h index 2c2d719..274a3ce 100644 --- a/include/misc.h +++ b/include/misc.h @@ -27,7 +27,7 @@ extern "C" { #include -void why2_generate_text_key_chain(char *key, int *text_key_chain, int text_key_chain_size, enum WHY2_TEXT_KEY_CHAIN_VERSIONS version); //GENERATES ARRAY FOR ENCRYPTION/DECRYPTION +void why2_generate_text_key_chain(char *key, int *text_key_chain, int text_key_chain_size); //GENERATES ARRAY FOR ENCRYPTION/DECRYPTION char *why2_generate_key(int key_length); //GENERATE ENCRYPTION KEY void why2_deallocate_output(why2_output_flags flags); //DEALLOCATES flags enum WHY2_EXIT_CODES why2_check_version(void); //THIS FUNCTION CHECKS IF LATEST WHY2_VERSION OF WHY2 IS USED diff --git a/src/core/lib/utils/misc.c b/src/core/lib/utils/misc.c index 595e30f..16e5bbe 100644 --- a/src/core/lib/utils/misc.c +++ b/src/core/lib/utils/misc.c @@ -254,7 +254,7 @@ enum WHY2_EXIT_CODES why2_check_version(void) //! CRASHES WHEN CALLED FROM CHAT return WHY2_SUCCESS; } -void why2_generate_text_key_chain(char *key, int *text_key_chain, int text_key_chain_size, enum WHY2_TEXT_KEY_CHAIN_VERSIONS version) +void why2_generate_text_key_chain(char *key, int *text_key_chain, int text_key_chain_size) { int number_buffer; int number_buffer_2; @@ -271,7 +271,7 @@ void why2_generate_text_key_chain(char *key, int *text_key_chain, int text_key_c number_buffer -= why2_get_key_length(); } - switch (version) + switch (why2_get_flags().version) { case WHY2_v1: number_buffer_2 = i;