miho
miho

Reputation: 12075

OpenSSL EVP_CIPHER free/release

I can't find any method like EVP_CIPHER_free in openssl/evp.h. Don't I need to release the EVP_CIPHERs?

Upvotes: 1

Views: 1196

Answers (1)

Chiara Hsieh
Chiara Hsieh

Reputation: 3393

No, you don't. The init function EVP_CipherInit_ex is actually initializing variables in EVP_CIPHER_CTX object ectx, which you pass as the first argument. Just remember to call EVP_CIPHER_CTX_cleanup(&ectx) when you're done.

Upvotes: 4

Related Questions