Skip to content

Commit e784d9d

Browse files
committed
cipher wipe out
1 parent abd76a6 commit e784d9d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cpp/src/parquet/util/crypto.h

+12
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ class AesEncryptor {
5959
int key_len, uint8_t* aad, int aad_len, uint8_t* nonce,
6060
uint8_t* encrypted_footer);
6161

62+
void WipeOut() {
63+
if (NULLPTR != ctx_) {
64+
EVP_CIPHER_CTX_free(ctx_);
65+
}
66+
}
67+
6268
~AesEncryptor() {
6369
if (NULLPTR != ctx_) {
6470
EVP_CIPHER_CTX_free(ctx_);
@@ -91,6 +97,12 @@ class AesDecryptor {
9197
int Decrypt(const uint8_t* ciphertext, int ciphertext_len, uint8_t* key, int key_len,
9298
uint8_t* aad, int aad_len, uint8_t* plaintext);
9399

100+
void WipeOut() {
101+
if (NULLPTR != ctx_) {
102+
EVP_CIPHER_CTX_free(ctx_);
103+
}
104+
}
105+
94106
~AesDecryptor() {
95107
if (NULLPTR != ctx_) {
96108
EVP_CIPHER_CTX_free(ctx_);

0 commit comments

Comments
 (0)