void cipher_close(cipher_t *cipher) {
EVP_CIPHER_CTX_cleanup(&cipher->ctx);
- if(cipher->counter) {
- free(cipher->counter);
- cipher->counter = 0;
- }
+ free(cipher->counter);
+ cipher->counter = NULL;
}
size_t cipher_keylength(const cipher_t *cipher) {