Skip to content

Commit

Permalink
changed delete_key to use OPENSSL_clear_free(
Browse files Browse the repository at this point in the history
  • Loading branch information
bschoening committed Mar 15, 2023
1 parent 9d24ae2 commit 835a9e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ff1.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ FPE_KEY* FPE_ff1_create_key(const char *key, const char *tweak, unsigned int rad

void FPE_ff1_delete_key(FPE_KEY *key)
{
OPENSSL_free(key->tweak);
OPENSSL_free(key);
OPENSSL_clear_free(key->tweak,key->tweaklen/8);
OPENSSL_clear_free(key,sizeof(key));
}

void FPE_ff1_encrypt(char *plaintext, char *ciphertext, FPE_KEY *key)
Expand Down

0 comments on commit 835a9e5

Please sign in to comment.