implemented why2_clean_memory in encrypter

This commit is contained in:
Václav Šmejkal 2023-02-02 18:05:21 +01:00
parent eec8d13a5c
commit e0cacd52a7
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -48,6 +48,8 @@ why2_output_flags why2_encrypt_text(char *text, char *keyNew)
return why2_no_output(checkExitCode); return why2_no_output(checkExitCode);
} }
why2_set_memory_identifier("core_decrypt");
//VARIABLES //VARIABLES
char *key = NULL; char *key = NULL;
char *returningText; char *returningText;
@ -60,6 +62,7 @@ why2_output_flags why2_encrypt_text(char *text, char *keyNew)
//CHECK FOR INVALID key //CHECK FOR INVALID key
if ((checkExitCode = why2_check_key(keyNew)) != WHY2_SUCCESS) if ((checkExitCode = why2_check_key(keyNew)) != WHY2_SUCCESS)
{ {
why2_clean_memory("core_decrypt");
return why2_no_output(checkExitCode); return why2_no_output(checkExitCode);
} }
@ -130,5 +133,7 @@ why2_output_flags why2_encrypt_text(char *text, char *keyNew)
why2_free(textKeyChain); why2_free(textKeyChain);
why2_free(textBuffer); why2_free(textBuffer);
why2_reset_memory_identifier();
return output; return output;
} }