Skip to content

Commit

Permalink
cipher wipe out
Browse files Browse the repository at this point in the history
  • Loading branch information
ggershinsky committed May 28, 2019
1 parent abd76a6 commit e784d9d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cpp/src/parquet/util/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ class AesEncryptor {
int key_len, uint8_t* aad, int aad_len, uint8_t* nonce,
uint8_t* encrypted_footer);

void WipeOut() {
if (NULLPTR != ctx_) {
EVP_CIPHER_CTX_free(ctx_);
}
}

~AesEncryptor() {
if (NULLPTR != ctx_) {
EVP_CIPHER_CTX_free(ctx_);
Expand Down Expand Up @@ -91,6 +97,12 @@ class AesDecryptor {
int Decrypt(const uint8_t* ciphertext, int ciphertext_len, uint8_t* key, int key_len,
uint8_t* aad, int aad_len, uint8_t* plaintext);

void WipeOut() {
if (NULLPTR != ctx_) {
EVP_CIPHER_CTX_free(ctx_);
}
}

~AesDecryptor() {
if (NULLPTR != ctx_) {
EVP_CIPHER_CTX_free(ctx_);
Expand Down

0 comments on commit e784d9d

Please sign in to comment.