mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 00:56:31 +08:00
cipher wipe out
This commit is contained in:
1 parent
abd76a6221
commit
e784d9d9ca
1 file changed
+12
@@ -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_);
|
||||
@@ -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_);
|
||||
|
||||
Reference in new issue
Block a user