diff --git a/src/core/lib/encrypter.c b/src/core/lib/encrypter.c index 86528a6..0622ee8 100644 --- a/src/core/lib/encrypter.c +++ b/src/core/lib/encrypter.c @@ -72,9 +72,7 @@ why2_output_flags why2_encrypt_text(char *text, char *keyNew) why2_set_key_length(strlen(key)); } else //LOAD KEY { - key = why2_malloc(why2_get_key_length() + 1); - - why2_generate_key(key, why2_get_key_length()); + key = why2_generate_key(why2_get_key_length()); } //LOAD textKeyChain diff --git a/src/logger/lib/test/main.c b/src/logger/lib/test/main.c index 70d9adf..3ddfa7d 100644 --- a/src/logger/lib/test/main.c +++ b/src/logger/lib/test/main.c @@ -26,13 +26,10 @@ int main(void) { //VARIABLES why2_log_file logger = why2_init_logger(WHY2_WRITE_DIR); //INITIALIZE LOGGER FILE - char *used_key = why2_malloc(why2_get_key_length() + 1); + char *used_key = why2_generate_key(why2_get_key_length()); //GENERATE KEY why2_decrypted_output decrypted; int exit_code = 0; - //GENERATE KEY - why2_generate_key(used_key, why2_get_key_length()); - //FLAGS why2_log_flags flags = {