Changeset cb075c5 for tools/traceanon/Anon.cc
- Timestamp:
- 03/02/17 13:46:56 (5 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, master, ndag_format, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
- Children:
- 684a21c
- Parents:
- 4db5b98
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/traceanon/Anon.cc
ree6e802 rcb075c5 107 107 108 108 this->cipher = EVP_aes_128_ecb(); 109 EVP_CIPHER_CTX_init(&this->ctx); 110 111 EVP_EncryptInit_ex(&this->ctx, this->cipher, NULL, this->key, NULL); 109 this->ctx = EVP_CIPHER_CTX_new(); 110 EVP_CIPHER_CTX_init(this->ctx); 111 112 EVP_EncryptInit_ex(this->ctx, this->cipher, NULL, this->key, NULL); 112 113 113 114 this->cachebits = cachebits; … … 125 126 CryptoAnon::~CryptoAnon() { 126 127 delete(this->ipv4_cache); 127 EVP_CIPHER_CTX_cleanup(&this->ctx); 128 EVP_CIPHER_CTX_cleanup(this->ctx); 129 EVP_CIPHER_CTX_free(this->ctx); 128 130 } 129 131 … … 255 257 * bit in the original address, we use the first bit of the resulting 256 258 * encrypted output as part of an XOR mask */ 257 EVP_EncryptUpdate( &this->ctx, (unsigned char *)rin_output, &outl,259 EVP_EncryptUpdate(this->ctx, (unsigned char *)rin_output, &outl, 258 260 (unsigned char *)rin_input, 16); 259 261 … … 290 292 memcpy(rin_input, &input, 8); 291 293 292 EVP_EncryptUpdate( &this->ctx, (unsigned char *)rin_output, &outl,294 EVP_EncryptUpdate(this->ctx, (unsigned char *)rin_output, &outl, 293 295 (unsigned char *)rin_input, 16); 294 296
Note: See TracChangeset
for help on using the changeset viewer.