implemented why2_clean_memory in encrypter
This commit is contained in:
parent
eec8d13a5c
commit
e0cacd52a7
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user